Wildcards in VB code

  • Thread starter Thread starter DJHymel
  • Start date Start date
D

DJHymel

I am trying to use

Dim strSQL As String
strSQL = "CategoryID = Like'*'"
DoCmd.OpenReport "rptProducts", acViewPreview, , strSQL

but returns Run-Time error "3075":
Syntax error (missing Operator) in query '(categoryID =
Like'*')'

I know I can eliminate the the srtSQL in the Docmd (and
the report will show all records), but this is only part
of the code.

Thanks in advance for any help
 
Get rid of the equals sign. You use one or the other, not both.
 
So simple. Thanks
-----Original Message-----
Get rid of the equals sign. You use one or the other, not both.

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)





.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top