Link to home
Start Free TrialLog in
Avatar of Tim313
Tim313Flag for United States of America

asked on

TimeOfDay

I'm trying to use TimeOfDay in my code to enter the system time into a table (field "Time") each time the user enters a record.

My code (simplified):
Dim currentTime As Date
currentTime = TimeOfDay
sql="Insert into tblTime (Time) Values (" & currentTime & ")"

The actual dbconnection and sql statement worked until I added the "Time" field and " & currentTime &".

Is my reference to the varible correct?

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tim313

ASKER

Thanks for the quick response and accurate solution!