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
 
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)





.
 
Back
Top