Conditional Query

K

katzy

It's been a while since I have used Access.
I am trying to run a query so that I can use it for a report. I need to
show dates for four different categories that are within a certain time frame
for each customer name. Each customer can have up to four dates displayed
(one for each category), but if the date is not within the time frame, then
it will not show up. So, a customer can 1 to 4 dates listed, because if none
are listed then the customer name will not be displayed at all. I figured
maybe I should just do an if statement within the report, but I don't
remember the notation for if statements anymore either!

Here's a view of what I'm trying to do:

Upcoming Expirations
-----------------------------------------
Joe
Business License: 09/15/05
Car Insurance: 10/09/05
Jane
Car Insurance: 09/25/05
Worker's Comp: 10/01/05
Jill
Liability: 09/30/05
James
Car Insurance: 10/01/05
Liability: 10/01/05
Worker's Comp: 10/01/05


(John has no upcoming expirations so he is not listed)


Any suggestions/help would be greatly appreciated!

Thanks!
 
K

KARL DEWEY

Try this --
SELECT Table23.Name, Table23.Category, Table23.Expiration, [Enter days
advance] AS Advance
FROM Table23
WHERE (((Table23.Expiration)<=(Date()+[Enter days advance])));
 
K

katzy

I have already created the 4 separate queries, which was no problem. How
would I go about creating a union query to combine them?
 
Top