Updating Field by Command Button

jamjarr

Registered User.
Local time
Tomorrow, 00:34
Joined
Apr 30, 2005
Messages
17
Hi all

I have searched the forums and tried various options but I get an error message about the syntax.

The button is to run a SQL query to update a field by calculating on the value of a another field on the form. The query is
DoCmd.RunSQL "UPDATE BatchPayments SET BatchPayments.[GST Amount] = (BatchPayments.[Net Amount]*0.1) WHERE BatchPayments.BatchPaymentsID=" & Me.BatchPaymentsID&";"


The error message is a compile error where it is expecting a list separator or ).

Probably simple but it has got me beat.

Any help will be appreciated.

Regards
 
I haven't tried your code but ...

you'll need a space before

Code:
& ";"

good luck
 
you probably need a space before the last equals sign also
 

Users who are viewing this thread

Back
Top Bottom