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

report and parameters

Status
Not open for further replies.

mama16

MIS
Oct 22, 2004
125
US
I have a problem, I'm running a query with a parameter. It's asking the user to enter the state, beginning month and ending month for a particular state. When I run the report, everything comes out alright. My question is, will access allow me to select more states instead of one and compare them. What if the user wants to select 3 or 5 states in the parameter box when he/she runs the report?
Any ideas?
 

mama16,

If you are using a parameter box in the query which the report is based, the report can only accept one entry per parameter. Two options could be, dynamically create the SQL behind the report based on say state selections in a list box (on a form), this will be a bit of work and probably isnt what you are after.

Another easier less flexible option would to be create a parameter table. Ie create a single column table, and enter the 3 or 5 states you wish to base the report on (each time you run the report). In your query create a join between the state field in your parameter table and another table in the query which contains a state field.

Hope this helps.

Mordja
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top