InputBox Issue

sroot

Registered User.
Local time
Today, 08:56
Joined
Mar 18, 2013
Messages
53
I have an inputbox that a user needs to put in a date, but for some reason the date is not working, every date shows in the table as 12/30/1899... What am i doing wrong? Here is what i have.

Code:
strDt = InputBox("Enter date of double")
CurrentDb.Execute "INSERT INTO tblDate([TheDate]) VALUES(" & strDt & ")"
 
Probably need to surround with #
CurrentDb.Execute "INSERT INTO tblDate([TheDate]) VALUES(#" & strDt & "#)"
 
You are correct... i cant believe i didn't think about that. Thank you so much!
 

Users who are viewing this thread

Back
Top Bottom