Can you have a combo box choice run a report

  • Thread starter ryan.fitzpatrick3
  • Start date

R

ryan.fitzpatrick3

Currently I have a query with a date parameter which looks like
between [Start Date:] and [End Date:]
this works good, but is there away to make it where upon running a
report a combobox shows up where you can either pick between [Start
Date:] and [End Date:] i.e you can type in a manual date such as 1/1/7
and 12/31/7 or it the combo box can have Q1, Q2, Q3, Q4 in it, and
it'll run the date range for that quarter?

So if a person, upon running the report, will have a choice to either
do a manual date entry or they can select Q2 and only the Q2 data will
populate the report? With that being said, how do I program that into
the query? Do I do it under criteria in the "OR" section and have like
criteria between [Start Date:] and [End Date:]
OR Q1: between 01/01/07 and 03/31/07
OR Q2 between 04/01/07 and 06/30/07
OR Q3 between 07/01/07 and 09/30/07
OR Q4 between 10/1/07 and 12/31/07

The combo box would show manual, Q1, Q2,Q3,Q4, is this possible. Above
I have no clue how to go about it so I imagine it's completely wrong.
Thanks.

Ryan
 
Ad

Advertisements

E

Evi

Put your combo into a form. If you have a query that contains Q1, Q2, Q3 etc
you can base your combo on that.

You have more flexibility using a form than using a parameter query and your
user will know what choices are available (if you've ever tried to open some
of the Parameter reports in the Access97 version of Northwind and had to
guess at what dates you had to type in, you will understand how helpful this
is)

To get a really practical example of how to make this work, download Allen
Browne's Search2000 database and look at the code page: he peppers it with
helpful notes to let you know what each bit does.

Also read his page.

http://allenbrowne.com/ser-62.html

Evi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top