[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to use wildcard in query criteria

Posted on 2013-06-13
3
Medium Priority
?
707 Views
Last Modified: 2013-06-13
See embedded picture please.
I have a form with controls "display" and "block" with parameter values and a query which uses these parameters in criteria.
The default values of two of the criteria field are * per default.
However the query renders no records under these conditions.
If I put * in the criteria of the query directly, it displays all records, but not when the criteria refers to the appropriate controls on the form.
If I select actual values in the controls, the query renders correctly.
What am I doing wrong. I believe I have done this before.
Picture of form and query
0
Comment
Question by:Fritz Paul
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 39244992
try placing  "Like" in front of your criteria. i.e.,

Like Forms!NameOfform!NameOfControl

or

Like Forms!NameOfform!NameOfControl & "*"
0
 
LVL 58
ID: 39245003
In the query, you need to use the Like operator along with the control value or add a column in the query of using the control reference and put an asterick (*) as the criteria.

 So it's either some column = the form control or the form control = "*"

Jim.
0
 

Author Closing Comment

by:Fritz Paul
ID: 39245023
The "Like Forms!NameOfform!NameOfControl" works fine.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question