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

passing form textbox data to query

Status
Not open for further replies.

tfoulkes

Technical User
Dec 5, 2003
17
GB
I have a form with a text-box, then a query that uses the text from this text-box as a parameter to search on.
There is also a button which runs this query.

The SQL:

SELECT Get_Education.*, Get_Education.[Page Path]
FROM Get_Education
WHERE (((Get_Education.[Page Path]) Like [Forms]![page_hit_search_form]![wordInput].[Text]));

when I run this query on its own it asks me for the value and gets the results fine.

If I put a value in the form then run the query it is also fine.

But, I have a button on the form which runs the same query when clicked. If I use this it returns no results, but doesn't throw an error.

Any ideas?

TIA

Tim
 
What is the Event Procedure behind the button? Do you have Docmd.RunSql or something else?
 
I just used the button wizard to make a button that opens the query...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top