Narrowing a select QRY down Further

JSDART!!

Registered User.
Local time
Today, 10:32
Joined
Mar 12, 2004
Messages
31
Hi
I have a select QRY that asks for a date range for intake calls. I need to get a count of calls that came in during that period that dropped out. I have a dropped out date field and in the qry have that set to is not null.
Here is the issue I only want the drop outs that are in the same date range as intake calls. Any Ideas how to do that without having to enter the date range again?
Thanks
J
 
I would use an unbound form with 2 controls (for the beginning and ending dates of the range). You would then reference the form controls in your query or queries.

SELECT ...
FROM ...
WHERE yourdatefield between forms!yourformname!nameoffirstdatecontrol and forms!yourformname!nameofseconddatecontrol

The form has to be open at the time the query is run.
 
Simple Software Solutions

Here is a solution you could try.

CodeMaster::cool:
 

Attachments

By having the name of the criteria that is doing the filtering exactly the same you can achieve this. It will only pop up twice instead of 4 times.
use:
WHERE (((IntakeCall) Between [FirstDate] And [LastDate]) AND ((DropOutCall) Between [FirstDate] And [LastDate]));

If you are using a forms control references as mentioned by the second poster then just change [FirstDate] and [LastDate] to the relevant controls.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom