Date Inserted as 30-Dec-1899 (1 Viewer)

Lissa

Registered User.
Local time
Today, 03:42
Joined
Apr 27, 2007
Messages
114
:confused: I'm kinda stumped right now..

After the user updates a subform, it inserts a record into another table.
The transaction date, which is the OrderDate from a parent form, keeps getting inserted into the table as 30-Dec-1899... how can I fix that?


Dim strSQL As String
strSQL = "INSERT INTO PART_STATUS (SerialNumber,TransactionDate, StatusId, PartInvId) VALUES ('888888', " & Forms![frmPurchaseOrder]![OrderDate] & ", '1', " & PartInvId & ")"
DoCmd.RunSQL strSQL

Thanks!
 

boblarson

Smeghead
Local time
Today, 01:42
Joined
Jan 12, 2001
Messages
32,059
Change this part:
VALUES ('888888', " & Forms![frmPurchaseOrder]![OrderDate] & ", '1', " &

To this:

VALUES ('888888', #" & Forms![frmPurchaseOrder]![OrderDate] & "#, '1', " &
 

Lissa

Registered User.
Local time
Today, 03:42
Joined
Apr 27, 2007
Messages
114
Awesome! That did the trick - Thanks!!!
 

Users who are viewing this thread

Top Bottom