easy syntax question

dat_guy

Registered User.
Local time
Today, 11:57
Joined
Jul 30, 2003
Messages
28
Hello,
I think this is an easy one, I just haven't found it elsewhere yet.

I have a union query based on two tables. I would like to be able to filter the results by a date range. I found this bit and it works well for single-table queries:

Between Date() And DateAdd("d",6,Date())

However, I can't seem to find the syntax to apply this to my sql code. This is my first union query and Access won't let me go into design view ( where I know how to apply this filter ). I made the union query following the instructions given by jeremie_ingram that I found here. And it works fine, it just needs filtered.

Could someone explain how to apply this filter to the code:

tblWedding.[Date of Function],

I could just base my union on two other filtered queries, but I figured I would try this first and maybe learn something.

thanx in advance
Dave
 
In the SQL statement, put the criteria as a Where clause after the table name e.g.

SELECT ..........
FROM tblWedding
WHERE [Date of Function] Between Date() And DateAdd("d",6,Date())
UNION
SELECT ..........
FROM [another table]
 
Exactly what I needed.:D Thank you very much.

Dave
 

Users who are viewing this thread

Back
Top Bottom