form input used in a query

cterjesen

Board Regular
Joined
Jun 23, 2003
Messages
119
I'm sure this is a simple question. I want to have a form where the user can input something into a text box and this input value is used at the criteria in a query.

I have multiple queries that are asking for the same criteria over and over again. I thought if this infomation could be captured on the form one time and fed to each query this would make the database much more user friendly.

I'm also open to using a combo box or drop down list if that's easier.

thanks!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
in the criteria of your query, put:

[forms]![yourformname]![yourcontrolname]

where controlname could be a text box or combo box
 
Upvote 0
How do I get the form to save the data input in the form's text boxes when I close out of the form and then come back in? Can I have the user's inputs feed to a table that can then be used in the queries?

Thanks!
 
Upvote 0
Assuming that the form is unbound you could create a table to hold the criteria and use it as the record source for the form.
You could either force the table to have just one record so that the last used criteria is there when the form is opend or you could save each combination as a new record and just browse for the one you want.

Peter
 
Upvote 0

Forum statistics

Threads
1,221,556
Messages
6,160,476
Members
451,649
Latest member
fahad_ibnfurjan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top