Trying to run an SQL command in the VBA to insert the current date and time into a table but I keep getting a syntax error? Any help?
Thanks
The Username value is a variable declared within the code, and the Date and Time values are just the built in VBA functions.
Thanks
Code:
DoCmd.RunSQL "INSERT INTO tblAccessLog " _
& "User, DateLoggedIn, TimeLoggedIn) VALUES " _
& "(Username,Date,Time);"
The Username value is a variable declared within the code, and the Date and Time values are just the built in VBA functions.