Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

string with multiple criteria

Status
Not open for further replies.

Richey

Technical User
Aug 29, 2000
121
GB
Hi I need to execute a delete statement, using multiple criteria

i.e.

str1 = "delete * from tblinteractions where [ID] =" & Me!ID
db.execute(str)
this works fine but I now need to say

str1_new = "delete * from tblinteractions where [ID] =" & Me!ID And " [atoz] = " & Me.atoz.OldValue
where [atoz] is text

the str1_new ststement doesn't work

Any ideas?
thanks
Tim
 
You need to place single quotes around the new string criteria. For example:
[tt]
str1_new = "delete * from tblinteractions where [ID] =" & Me!ID And " [atoz] = '" & Me.atoz.OldValue & "'"
[/tt]
 
Also, your AND needs be inside your quotes... Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top