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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running several SQL statements (delete queries) in module

Status
Not open for further replies.

mssbass

IS-IT--Management
Aug 24, 2001
53
0
0
US
Private Sub deleteimport()
Dim strDelete As String

strDelete = "DELETE Service FROM [UPS COM]WHERE ([Service] Is Null Or [Service] Like 'Tot';)"

DoCmd.RunSQL strDelete


End Sub

I cannot get this module to run - It says "syntax error in expression". If the Service column is null or is like "Tot*", I want to delete the row. I've also got to do the same for 6 other tables - does this require 6 additional sub-functions & functions?
 
And what about this ?
strDelete = "DELETE FROM [UPS COM] WHERE [Service] Is Null Or [Service] Like 'Tot*'"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top