Hi. I have a form that with a few text boxes in Access 97. One of them is set to recieve a 'General Date'. When the button is clicked the following code tries to write the form fields to my db:
DoCmd.RunSQL ("INSERT INTO WageAccounts (WorkerID, Date, Earnt) VALUES(" & [WorkerID] & ", '" & [Date] & "', " & [Earnt] & ""
This throws up an error but works perfect if the Date field is excluded. The db field is formatted as a Date field as well. Do I need something else in the SQL string to modify the Date before it goes to the db? Many thanks in advance. ASCII silly question, get a silly ANSI
DoCmd.RunSQL ("INSERT INTO WageAccounts (WorkerID, Date, Earnt) VALUES(" & [WorkerID] & ", '" & [Date] & "', " & [Earnt] & ""
This throws up an error but works perfect if the Date field is excluded. The db field is formatted as a Date field as well. Do I need something else in the SQL string to modify the Date before it goes to the db? Many thanks in advance. ASCII silly question, get a silly ANSI