Prev: Changing constants in a query to user input values
Next: How can I query a set of dates but exclude non-working days?
From: mguffey5 on 3 Jun 2010 09:53 I have a database that tracks cadets that will commission into the military and they are broken into their year groups. My problem is that to generate a report for each year group I need a seperate query for each year group so I have multiple reports and multiple queries in my database. I'm trying to figure out a way to eliminate all those quieres down to one query and report so when I click the button to bring up the report a box will open up asking me to type in the year of commission and then the report will only show those cadets commissioning in that year. Any help would be appreciated. Matt
From: kc-mass on 3 Jun 2010 10:53
Hi Two options: If you want to produce a report for a single year look in help file for "Parameter Query". A parameter query will prompt for the year you are interested in. (you'll only need one query and one report) If you want a single report on all cadets grouped by year then create one query that pulls all the cadets. Create one report to display all cadets. In the report right click on the report and select "Sorting and Grouping". Enter the "Year" as the field. Select Group headers and footers as you need. Regards Kevin "mguffey5" <mguffey5(a)discussions.microsoft.com> wrote in message news:2764F081-B351-44C8-9E6C-0592C697133D(a)microsoft.com... >I have a database that tracks cadets that will commission into the military > and they are broken into their year groups. > > My problem is that to generate a report for each year group I need a > seperate query for each year group so I have multiple reports and multiple > queries in my database. > > I'm trying to figure out a way to eliminate all those quieres down to one > query and report so when I click the button to bring up the report a box > will > open up asking me to type in the year of commission and then the report > will > only show those cadets commissioning in that year. > > Any help would be appreciated. > > Matt |