filter table's 3 date fields to same date range

dbaldwin

Registered User.
Local time
Today, 17:11
Joined
Feb 13, 2011
Messages
40
I have a form that, using VBA code on update event, generates three date values in three fields, each one month greater than the other, based on the separate admission date field. The three dates generated represent when a case must be reviewed. I would like to generate a report that shows any and only records where dates in any of the three fields fall in the coming week. I have been able to query on a single date field with the condition <DateAdd("d",+7,Date()), but trying to use all three fields in a query hasn't worked. Is there a way for this to work? I've also tried to use three make table queries, and tried using the resulting tables in a query, but that hasn't worked either.

Any assistance would be greatly appreciated.
 
Howzit

It will work if you put the criteria on different lines for each of the 3 date fields you want to query. These will then execute the query using the OR syntax. If you put the criteria on the same line then it will run as an AND syntax where all 3 have to be TRUE
 
Hi, I'm trying to accomplish the same task. Where do you put the OR statement? In the Query design view or is it VBA?

Thanks in advance
 
What Kiwiman means is that if you put the criteria in separate rows in query design view then it will be processed with the Or operator instead of the And operator;

attachment.php
 

Attachments

  • query.jpg
    query.jpg
    98.2 KB · Views: 247

Users who are viewing this thread

Back
Top Bottom