Wil Cards in Report Preview Command Where Condition

S

silva

I'd like to know if there is a way to use a wild card character in a report
preview command. This would be the instruction used with a command button:

DoCmd.OpenReport stDocName, acPreview, , "[field_name] = 'filter text' "

I have entries that vary at the beginning, but always have the same ending,
and I'd like to be able to filter accordingly. Would this work in this
fashion? Or am I going to have to screw around and make special case queries
just for these?
 
D

Dirk Goldgar

silva said:
I'd like to know if there is a way to use a wild card character in a
report
preview command. This would be the instruction used with a command button:

DoCmd.OpenReport stDocName, acPreview, , "[field_name] = 'filter text' "

I have entries that vary at the beginning, but always have the same
ending,
and I'd like to be able to filter accordingly. Would this work in this
fashion? Or am I going to have to screw around and make special case
queries
just for these?


Check out the help topic on the Like operator. For example,

DoCmd.OpenReport stDocName, acPreview, , "[field_name] Like '*ending'"
 

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

Similar Threads


Top