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

Display search query on form.

Status
Not open for further replies.

sheusz

Technical User
Jan 21, 2008
24
AU
Hi All,

I know this is simple but I can't seem to get it working.[sadeyes]

I have a form that is run from a command button. The form runs a Query which searches a text field in a table and returns the results on the form.

What I want is for the search string to be passed on to the form so that it can displayed in a sentence like;

Search results for: searchstring

above the results of the search (probably in the form header)

Here is the query;
Code:
Like "*" & [What do you want to search for:] & "*"

The field that the Query is searching a a text field.

Does anybody know how to achieve this?
 
Why not have the user enter the search string into the form and then refer to the form in the query?

[tt]Like "*" & Forms!frmForm!txtTextbox & "*"[/tt]

 
Have a look here:
faq701-6763

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top