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

Query Criteria Help

Status
Not open for further replies.

firestorm1983

IS-IT--Management
Jun 13, 2005
6
I have created a Query in which a user must enter a value for Job Number, But I am unable to get my query to find all values containing that entered value.

For example if a user enters 5 I want my query to retrieve 5, 55, 15, 3/4/5 etc.

 
Where does the user enter the value? Do you have a parameter prompt or a reference to a control on a form. The control method is much more powerful and flexible.

Either way, your query criteria must use something like:
Like "*" & Forms!frmA!txtJobNum & "*"

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
There is a parameter prompt that opens as soon as the query is opened.

 
OK I used this criteria

Like "*" & [Queries]![COATING MASTER]![ENTER JOB NUMBER] & "*"

and it basically works fine but the parameter prompt reads as [Queries]![COATING MASTER]![ENTER JOB NUMBER]

and I would like it to read ENTER JOB NUMBER.
 
So, try this in the Criteria cell:
Like "*" & [ENTER JOB NUMBER] & "*"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Forms!frmA!txtJobNum assumed you followed my advice to set up a form and control rather than using a parameter prompt.

If you want to continue to use a parameter prompt you can use PH's suggestion.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top