I need help with this simple SQL statement

  • Thread starter Thread starter glen.welsh
  • Start date Start date
G

glen.welsh

I am a SQL novice and I need help with the following statement:

strSQL = "INSERT INTO tbl_Del_Prop (PERMANENT_DELETION,
PROPOSED_DELETION)"
strSQL = strSQL & " IN '" & vntDatabasePath & "' "
strSQL = strSQL & " VALUES (-1, 0)"
strSQL = strSQL & " WHERE (([ID]=" & Me!ID & "));"

I am trying to update Permanent and Proposed in a back end table when a
check box is selected on the front end form. I get an error that my
SQL string is missing a semicolon but I can't figure out why. Please
help.
 
Insert clauses don't use a WHERE clause because the record doesn't exist.

HTH;

Amy
 
Thanks Amy. I didn't know. If an INSERT clause doesn't use WHERE, how
do you specify which record to change in the table?
 
I explicitly said I was a novice. ;-) I see now how UPDATE can work
for me. Thanks for your help.
 
Back
Top