Date turns into 12/30/1899 ??
I've got a form where, among other things, users enter a date in a text box. The box is formatted to MM/DD/YY. In my VBA code (Access2k) I've got
Later on I go on to use an SQL statement (example follows) to stick that date into my table, but first I pop up a msgbox to show me that my_date has the correct value, which it does.
No matter what's in that textbox, though, or what the value of my_date is, it seems to put 12/30/1899 in the damn table. Anyone encounter this before?
Thanks!
I've got a form where, among other things, users enter a date in a text box. The box is formatted to MM/DD/YY. In my VBA code (Access2k) I've got
Code:
Dim my_date As Date
my_date = SubFrm_invoice_2!txt_invoice_date.Value
Later on I go on to use an SQL statement (example follows) to stick that date into my table, but first I pop up a msgbox to show me that my_date has the correct value, which it does.
Code:
strSQL = "INSERT INTO tbl_invoices (invoice_id, invoice_date) VALUES (" & my_number & ", " & my_date & ");"
Thanks!