InputBox Issue (1 Viewer)

sroot

Registered User.
Local time
Yesterday, 16:01
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 & ")"
 

Gasman

Enthusiastic Amateur
Local time
Today, 00:01
Joined
Sep 21, 2011
Messages
14,299
Probably need to surround with #
CurrentDb.Execute "INSERT INTO tblDate([TheDate]) VALUES(#" & strDt & "#)"
 

sroot

Registered User.
Local time
Yesterday, 16:01
Joined
Mar 18, 2013
Messages
53
You are correct... i cant believe i didn't think about that. Thank you so much!
 

Users who are viewing this thread

Top Bottom