giving a query a parameter by a user prompt

bear

New Member
Joined
Feb 20, 2003
Messages
5
Is there a way in access to get a query to ask you for a parameter, and then select the data based on that parameter?
Basically, I have a table which holds records of every photograph that I index. Each photo is grouped into a "set number", along the same lines as a roll of film. I want to be able to run a query that will bring together all the records for a specific set number, so that they can then be printed through a report. The set numbers take the format 000. I'm kind of familiar with the expression builder, and queries in design view.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi, if you go into your query design, in the criteria section under the "set number" enter something like this :

=[Enter Set Number]

When you run the query (or open the report that is based on the query) a small message box will appear asking "Enter Set Number". Whatever number you enter is then the criteria for that query.

HTH, Andrew. :)
 
Upvote 0

Forum statistics

Threads
1,221,831
Messages
6,162,252
Members
451,757
Latest member
iours

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