user1894555 user1894555 - 4 months ago 8
SQL Question

Insert todays date into Access table using SQL

Im trying to use an SQL statement to insert the current date into an access table.

Ive got

DoCmd.RunSQL "INSERT INTO tblImportedData (dtmReportDate) VALUES Now();"


This isnt working. Anybody know what im doing wrong?

Answer

You need to put Now() between brackets like this:

INSERT INTO tblImportedData (dtmReportDate) VALUES (NOW())