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!

How do I make a query from data inputted by user in a text box

Status
Not open for further replies.

rich01

Programmer
Jul 16, 2001
3
0
0
GB
Hi I am absolutley stumped !

I have a table that holds data on service call logs.

I want to run a query that will output say all service calls at a certain site. I want the user to input the site they want to search for in a text box, press a button and all calls at that site will be shown.

How can I link the contents of a text box and get the query to compare what is already in the database ??

Please help !!!


Cheers

Rich
 
Try this, create a new form and set its RecordSource to the table with your service call logs in. Create text boxes with the fields that you want to be displayed (the form needs to have the Default View property set to Continuous Forms and Allow filters to Yes with Form Header/Footers on), save this form.
In your form that you are querying from insert a Subform and set its Source Object to the form you have just created.
Set the Link Child Fields property to the Field in your Call Log table that the query relates to, and the Link Master Fields property to the TextBox they are entering into (Would it not be easier giving them a Combo Box to choose from?).

Now when you run the form whatever they enter in the textbox should filter the records they require.
Hope this helps... Rizla
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top