The form is basically a due-date entry form. User enters date received and an unbound text box (DueNext) calculates the date the report is next due (i.e. 3 months later.) I then have an INSERT statement to add the new due date, etc into the table.
Here's the code (on click event of a button):
DoCmd.RunSQL ("INSERT INTO [tblReports](reportNO,VendorID,DueDate) VALUES (" & ReportNo & "," & VendorID & "," & FormatDateTime(DueNext) & ");")
The first two fields are inserted, but the DueDate Field is always inserted as 12/30/1899.
From everything I've read, it seems that means a null value was inserted into that field. . .I can't figure out why! The date shows correctly on the form. I'm thinking it has something to do with the fact that it is an unbound field.
Can anyone help with this??
Here's the code (on click event of a button):
DoCmd.RunSQL ("INSERT INTO [tblReports](reportNO,VendorID,DueDate) VALUES (" & ReportNo & "," & VendorID & "," & FormatDateTime(DueNext) & ");")
The first two fields are inserted, but the DueDate Field is always inserted as 12/30/1899.
From everything I've read, it seems that means a null value was inserted into that field. . .I can't figure out why! The date shows correctly on the form. I'm thinking it has something to do with the fact that it is an unbound field.
Can anyone help with this??