Two queries sharing a parameter?

G

Guest

Hi

I have two subreports embedded in a main report. Each subreport has its own underlying unique query. The report shows the correct data when run. Each query needs to be narrowed according to a date range

Currently, the following parameter criteria is being used successfully in both queries

Between [Enter the period start date: dd/mm/yyyy] And [Enter the period end date: dd/mm/yyyy

The problem is that the user has to enter a starting and ending date twice. Is there anyway that the user can enter the dates only once, but BOTH queries are narrowed by the date range

Any help is appreciated

Cheers
Jody
 
A

Alphonse Giambrone

A more user friendly method of supplying the dates would also solve your
problem.
Create a small unbound form (frmDates) with 2 textboxes (txtFrom and txtTo)
and 2 command buttons -'Continue' (opens the report) and 'Exit' (closes the
form).
User enters the dates in the 2 textboxes and click 'Continue'.
For the date criteria in the 2 queries use:
Between Forms!frmDates!txtFrom and Forms!frmDates!txtTo


--

Alphonse Giambrone
Email: a-giam at customdatasolutions dot us


Jody said:
Hi,

I have two subreports embedded in a main report. Each subreport has its
own underlying unique query. The report shows the correct data when run.
Each query needs to be narrowed according to a date range.
Currently, the following parameter criteria is being used successfully in both queries:

Between [Enter the period start date: dd/mm/yyyy] And [Enter the period end date: dd/mm/yyyy]

The problem is that the user has to enter a starting and ending date
twice. Is there anyway that the user can enter the dates only once, but
BOTH queries are narrowed by the date range?
 

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