Syntax Error

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

I get a Syntax Error on this code. It's the last part CDSub >=2.
Any help appreciated.
Thanks
DS

CurrentDb.Execute "DELETE FROM tblCheckDetails WHERE [CDCheckID]=" &
Me!CheckID & " And[CDLineID]=" & Me![TxtLine] & " And [CDItemID] = " &
Me.TxtPrepItem & " And [CDSub] => 2 """
 
Try this:

CurrentDb.Execute "DELETE tblCheckDetails.* FROM tblCheckDetails WHERE ((
[CDCheckID]=" & Me.CheckID & ") And ([CDLineID]=" & Me.[TxtLine] & ") And (
[CDItemID] = " & Me.TxtPrepItem & ") And ([CDSub]=>2));"

This assumes all Me. variables are numbers and not text.

I get a Syntax Error on this code. It's the last part CDSub >=2.
Any help appreciated.
Thanks
DS

CurrentDb.Execute "DELETE FROM tblCheckDetails WHERE [CDCheckID]=" &
Me!CheckID & " And[CDLineID]=" & Me![TxtLine] & " And [CDItemID] = " &
Me.TxtPrepItem & " And [CDSub] => 2 """
 
kingston said:
Try this:

CurrentDb.Execute "DELETE tblCheckDetails.* FROM tblCheckDetails WHERE ((
[CDCheckID]=" & Me.CheckID & ") And ([CDLineID]=" & Me.[TxtLine] & ") And (
[CDItemID] = " & Me.TxtPrepItem & ") And ([CDSub]=>2));"

This assumes all Me. variables are numbers and not text.

I get a Syntax Error on this code. It's the last part CDSub >=2.
Any help appreciated.
Thanks
DS

CurrentDb.Execute "DELETE FROM tblCheckDetails WHERE [CDCheckID]=" &
Me!CheckID & " And[CDLineID]=" & Me![TxtLine] & " And [CDItemID] = " &
Me.TxtPrepItem & " And [CDSub] => 2 """
Thank You! Works great!
DS
 

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

SQL Rowsource 1
OPEN ARGS Trouble 2
Loop and Insert Problem 5
DCount Syntax 2
Not returning a value 7
For Loop 6
DSum Problem 2
Code Is Slow 3

Back
Top