R
Richard Hollenbeck
This short little query ought to be as simple as typing it in. I've done
queries like this a thousand times already. For some reason I just can't
seem to get a handle on the mixed usage of quotation marks and apostrophes
in the SQL statements. I have an errorlog table with the time field
automatically filled in as a default value of now(). The key field is an
autonumber called ID.
The other three fields are all I need to fill in. This little piece of code
is tucked into the error handler:
strSQL = "INSERT INTO tblErrorLog (Number, Description, Source) VALUES ( " &
Err.Number & ",'" & Err.Description & "'," & Err.Source & "')"
(but all on one line)
Syntax error in Insert Into statement.
I've been struggling with this for over an hour. What a waste of time! One
apostrophe out of place and the whole thing goes south.
queries like this a thousand times already. For some reason I just can't
seem to get a handle on the mixed usage of quotation marks and apostrophes
in the SQL statements. I have an errorlog table with the time field
automatically filled in as a default value of now(). The key field is an
autonumber called ID.
The other three fields are all I need to fill in. This little piece of code
is tucked into the error handler:
strSQL = "INSERT INTO tblErrorLog (Number, Description, Source) VALUES ( " &
Err.Number & ",'" & Err.Description & "'," & Err.Source & "')"
(but all on one line)
Syntax error in Insert Into statement.
I've been struggling with this for over an hour. What a waste of time! One
apostrophe out of place and the whole thing goes south.