Getting Syntax Error

J

Junior

Hi - i'm getting a syntax error 3075 for the where clause in the below SQL
statement.
i've tried substituting chr39 and removing " but not found the right
combination
appreciate any help, pointers, advice

strSQL = "DELETE tblReviewed.*, tblReviewed.SSN, tblReviewed.RmkID " & _
"FROM tblReviewed " & _
"WHERE (((tblReviewed.SSN)=" & Chr(34) & strSSN & Chr(34) & " AND " &
_
"((tblReviewed.RmkID)=" & Chr(34) & strRmk & Chr(34) & ";"
 
J

Jen

Hi Jr.,

Should be Chr(39), but should be before the double
quotes. This may be a cleaner way to write it:

strSQL = "DELETE tblReviewed.*, tblReviewed.SSN,
tblReviewed.RmkID " & _
"FROM tblReviewed " & _
"WHERE tblReviewed.SSN = '" & strSSN & "' AND " &
"tblReviewed.RmkID= '" & strRmk & "';"

Of course, I'm assuming both strSSN and strRmk are both
strings (which looks to be the case).

Regards,
Jen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Syntax Error 3
lost in error 3075 8
Two multi-select listboxes 5
Too few parameters? 9
Query Def 0
MS Project Query Error 1
Incorrect syntax for dynamic Update query 1
Import MS Project Data through Query 1

Top