SQL insert into currency field (1 Viewer)

Manning

Registered User.
Local time
Yesterday, 18:33
Joined
Sep 12, 2005
Messages
19
I have a field defined as currency. How do I write the following query in VBA so it will be accepted and form a new row?

strSQL = "Insert INTO test (money) Values ($0.00);"

DoCmd.RunSQL strSQL

field: money
field size: long integer
format: currency
decimal places: auto

I know it's a stupid Insert but it just for learning.
 

RuralGuy

AWF VIP
Local time
Yesterday, 19:33
Joined
Jul 2, 2005
Messages
13,826
Just for the record, Integers (long or otherwise) can not store a decimal (0.00). You will get (0) and that's it. Have you played with the query builder?
 

Manning

Registered User.
Local time
Yesterday, 18:33
Joined
Sep 12, 2005
Messages
19
So I need to make the field a double, right?

I'll play around with that and see what I get. Thanks for the tip.
 

Users who are viewing this thread

Top Bottom