Using a form and 'Like' in a query

Moxioron

Registered User.
Local time
Today, 06:56
Joined
Jul 11, 2012
Messages
68
Hello all.

I am driving a query through a form and everything works fine....except when the first letter of the field is the same..

So here is my criteria...Like [Forms]![frm_Delinquency By Tier]![Tier/Program] & "*"

I only want the results if the Tier/Program matches what I have selected. If I select B for example, it returns the results for B and anything else in that field that starts with B. I have a Business Tier/Program and so I get results for both B and Business.

My question is, how to set the criteria up so that I only get B when I select B and not anything that starts with that letter.

Thanks for your help!
 
drop the like and asterix and use =

= [Forms]![frm_Delinquency By Tier]![Tier/Program]
 
Thanks CJ. What if I want to display all of the results?
 
If you mean all records then

Where fieldname= [Forms]![frm_Delinquency By Tier]![Tier/Program] or [Forms]![frm_Delinquency By Tier]![Tier/Program] Is Null

Then when nothing is entered in the form all records will be selected

Brian
 

Users who are viewing this thread

Back
Top Bottom