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!

Quick help with SQL code (syntax)

Status
Not open for further replies.

zahara666

Technical User
Nov 1, 2001
78
0
0
CA
I have the following code and don't know how to incorporate the string that I need:

"SELECT ... FROM ... WHERE (((ClientTable.ClientName) Not Like "TEST" ) AND ((Int1Table.Invoiced)=False) AND ((Int1Table.Received) Between #" & [Forms]![InvoiceForm]![FromDate] & "# And #" & [Forms]![InvoiceForm]![ToDate] & "#) AND ((Int1Table.ClientCode)="

The code works fine, except I don't know how to handle the Not Like "TEST" part. Will an & do the trick?

Thanks in advance,
Julie

 
You probably want to encase "TEST" in wildcards.....

WHERE (((ClientTable.ClientName) Not Like "*TEST*"
 
I tried that, but that doesn't work. I have to intergrate the string into the SQL code and the quotes are what is messing it up.

Thanks,
Julie
 
You can use CHR(34)'s around your string literals JHall
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top