Link to home
Start Free TrialLog in
Avatar of Fritz Paul
Fritz PaulFlag for South Africa

asked on

How to use wildcard in query criteria

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.
User generated image
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Avatar of Fritz Paul

ASKER

The "Like Forms!NameOfform!NameOfControl" works fine.