Easy birthdays question...

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
 
J

John W. Vinson

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top