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

Help with Criteria Expression in Query - VBA? 1

Status
Not open for further replies.

pdldavis

Technical User
Oct 29, 2001
522
US
Hi, I'm building a report where the criteria for one particular field is based off a combo box. I need to add a selection for all - "Like *" when entered manually. I have not been successful getting anything to work. The problem is "*" is taken as a literal character instead of a wild card.

One person suggested a union query, which helped but did not produce the desired results. He suggested this could also be done in VBA.

I would like to write something similar to this, except one that works:

IIf([forms]![frmMenu]![Cbosus]="All",([TblPunchlist].[Start-up System]) Like "*",[forms]![frmMenu]![Cbosus])

Any help would be appreciated.

Thanks, Dan
 
You could try using querydefs in VBA. This FAQ might point you in the right direction...

faq701-2328

Hope this gets you started!

Mincefish
 
That was the assistance I needed. Thank You.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top