I am trying to populate the SaleDate column in my table using the UPDATE command.
Dim mydate As Date
mydate = DateValue("01/" & strmonth & "/" & stryear)
MsgBox ldate (shows date in mm/dd/yyyy format correctly)
When I try to use mydate in the UPDATE statement, I get the error: too few arguments.
CurrentDb().Execute "UPDATE 1 SET [SaleDate] = mydate;"
Can somebody help me with this?
If my method is completely wrong, can you please suggest how I can use a date variable in the UPDATE statement?
Dim mydate As Date
mydate = DateValue("01/" & strmonth & "/" & stryear)
MsgBox ldate (shows date in mm/dd/yyyy format correctly)
When I try to use mydate in the UPDATE statement, I get the error: too few arguments.
CurrentDb().Execute "UPDATE 1 SET [SaleDate] = mydate;"
Can somebody help me with this?
If my method is completely wrong, can you please suggest how I can use a date variable in the UPDATE statement?