Syntax Error

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 """
 
K

kingston via AccessMonster.com

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 """
 
D

DS

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
 
Top