P
plh
I am trying to construct an SQL sting that includes a date and time entry. The
second field in the table tblTransactions is of type "Date/Time" with the format
of "General Date":
strSQL = "INSERT INTO tblTransactions VALUES " & _
"(" & Me.txtID.Value & ", " & Me.txtOEDateOut.Value & ", " &
Me.cmbOESendees.Value & ")"
As its name implies Me.txtOEDateOut is a text box control.
This results in:
INSERT INTO tblTransactions VALUES ( 8, 12/4/2006 10:12:02 AM, 5)
I get this error message:
Syntax error (missing operator) in query expression '12/4/2006 10:12:02 AM'.
I have the feeling that it has to do with the spaces in '12/4/2006 10:12:02 AM'
but what do I do about that? I would have thought that a General Date could
include both the date and the time.
Thank You,
plh
second field in the table tblTransactions is of type "Date/Time" with the format
of "General Date":
strSQL = "INSERT INTO tblTransactions VALUES " & _
"(" & Me.txtID.Value & ", " & Me.txtOEDateOut.Value & ", " &
Me.cmbOESendees.Value & ")"
As its name implies Me.txtOEDateOut is a text box control.
This results in:
INSERT INTO tblTransactions VALUES ( 8, 12/4/2006 10:12:02 AM, 5)
I get this error message:
Syntax error (missing operator) in query expression '12/4/2006 10:12:02 AM'.
I have the feeling that it has to do with the spaces in '12/4/2006 10:12:02 AM'
but what do I do about that? I would have thought that a General Date could
include both the date and the time.
Thank You,
plh