Query based on a textbox

junmart

Registered User.
Local time
Today, 10:07
Joined
Sep 14, 2001
Messages
29
I cant seem to make a text box as a source of my query. in the criteria, i entered forms![forms1]![textbox1]. am i missing something?
 
What kind of error are you getting? Does it ask you for the value of the form? If that is the case, the problem is that the form has to be open when the query is run.
 
it does not give me any error nor ask me for any value. its just that i dont get any results. it just gives me a blank datasheet with headers but no data. the query should have returned lots of records with the keyword i typed in. should i assign a variable for the text box?
 
If the criteria from the form causes the query to return no matching records ..... the result will be what you have posted.

Enter the criteria in the form, then manually execute the query to see if you get the expected results. If the query returns no matching records, the form will be blank as you describe.

HTH
RDH

[This message has been edited by R. Hicks (edited 09-17-2001).]
 
Thanks a lot for your replies. the problem was due to the table relationships. i have another problem though. how do i display the results of my query in the same form that i run the query from. the query returns a datasheet, which i think is the norm. Thanks!
 
You would probably do better to recreate the same form, but change the data source on the controls and the form to your query. That's a quick fix. But what it now sounds like you are doing is trying to find all of something in your table for your form. In which case you should be using the Filter functions rather than running a query. Code can be created to activate the filter based off of the textbox control you want to search for, or from a combobox placed on your form that acts just like the query did.

[This message has been edited by jwindon (edited 09-18-2001).]
 

Users who are viewing this thread

Back
Top Bottom