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

Delete Where ID field is Empty

Status
Not open for further replies.

hext2003

Technical User
Joined
Oct 9, 2006
Messages
119
Location
US
I have a table with several row where

Dim SQL1 As String
SQL1 = " DELETE * From cust Where [contract] = ??? "
DoCmd.RunSQL SQL1

Contract has a 1, 2 or nothing in it. i want to keep all the 1's and 2's but delete out the ones with nothing.

I have tried NULL I have try "" and '' and <> 1 but can't get it to work.

 
Dim SQL1 As String
SQL1 = " DELETE * From cust Where [contract] is null "
DoCmd.RunSQL SQL1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top