Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / June 2005



Tip: Looking for answers? Try searching our database.

Currency Formats Not Coming Thru

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sean Dotson - 29 Jun 2005 19:59 GMT
I have an Access DB and one of the columns is set to a Currency type.

I get the records into a variant array via...

If myConnection.State = adStateOpen Then
           myRecordset.Open "SELECT * FROM " & sTable, myConnection,
adOpenDynamic, adLockOptimistic, adCmdText
Else
 MsgBox "The connection could not be made."
 myConnection.Close
 Exit Sub
End If

ArrayName = myRecordset.GetRows

--------------------------------------------------------------

If I put a watch on the array it lists the value as 100  (why not 100.00)
for example and of a currency type.

If I then try to dump that values into a cell formatted to be a currency
type it lists 100 (not 100.00) as I'd expect.

The values ARE listed as $100.00 in the DB itself.

Any ideas?

Signature

Sean Dotson
RND Automation & Engineering
www.mcadforums.com

Val Mazur (MVP) - 30 Jun 2005 03:34 GMT
Hi Sean,

How Access shows value is just a formatting presentation, but actual value
is 100. Recordset keeps the values without any formatting. If you need to
see it, then you should apply formatting when you populate values into
control that displays it.

Signature

Val Mazur
Microsoft MVP

http://xport.mvps.org

>I have an Access DB and one of the columns is set to a Currency type.
>
[quoted text clipped - 22 lines]
>
> Any ideas?
Sean Dotson - 30 Jun 2005 14:49 GMT
OK, thanks... I'll have a look..

Signature

Sean Dotson, PE
RND Automation & Engineering
www.mcadforums.com

> Hi Sean,
>
[quoted text clipped - 29 lines]
>>
>> Any ideas?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.