Easy birthdays question...

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Hi,

I have one table in my database named, Clients. It has the following
fields: FirstName, Surname, Address1, Address2, Address3, DOB, and
LetterSent.

My question is, how do I show all the clients who have a birthday coming up
in the next 7 days?
Once I have that information displayed, the user is then supposed to put a
tick the LetterSent checkbox for each client.
Then, say the query was run later that day, the clients who appeared in the
query earlier on would now not appear as they have a tick in the LetterSent
field.

So I think I need something like this, I just don't know the correct syntax!
SELECT Clients.FirstName, Clients, Surname, Clients.DOB As UpcomingBirthdays
WHERE Clients.DOB = Between today and 7 days from today
AND Clients.LetterSent Is Not Ticked


Sorry for the n00b question!
Thanks,
Paul
 
My question is, how do I show all the clients who have a birthday coming up
in the next 7 days?
Once I have that information displayed, the user is then supposed to put a
tick the LetterSent checkbox for each client.

SELECT Clients.FirstName, Clients, Surname,
DateSerial(Year(Date(), Month([DOB]), Day([DOB])) AS Birthday
FROM Clients
WHERE DateSerial(Year(Date(), Month([DOB]), Day([DOB]) = Between Date() And
Date() + 7
AND NOT Clients.LetterSent;


John W. Vinson [MVP]
 
Back
Top