Dates of Birth

M

Mike Hosford

Hi
Dates of birth are in date/time format- need instructions
on how to select birthdays by specific month so that I
can send greetings to my Clients from all years not just
one year ie: everybodys birth date that falls in November
from say 1940 - 2003.

any help would be much appreciated

nb what is an operator and what is an operand

sorry to be a dumbo

Cheers Mike
 
A

Angela Corvaia

You need to use a criteria in the Query that chooses just
those with a month value of 1 through 12.

SELECT Customer.Customer, Customer.BirthDate, etc.
FROM Customer
WHERE ((Month([Customer]![BirthDate])=[?]));

And then when prompted, enter the month value (1=January,
2=February, etc)

In my opinion, an OPERATOR and an OPERAND are kinda the
same thing.
 
J

John Vinson

Hi
Dates of birth are in date/time format- need instructions
on how to select birthdays by specific month so that I
can send greetings to my Clients from all years not just
one year ie: everybodys birth date that falls in November
from say 1940 - 2003.

One way to do this is to use the DateSerial function to calculate this
year's birthday anniversary from the date of birth field (which I'll
assume is named DOB):

HappyHappy: DateSerial(Year(Date()), Month([DOB]), Day([DOB])

This combines the current year - Year(Date()) - with the month and day
of the birthdate.

You can then use a criterion on this field such as

BETWEEN Date() AND Date() + 7

to see those birthdays coming up in the next week.

Angela's suggestion for finding a specific month is fine too if that's
what you want to do - the HappyHappy field gives you some more
flexibility.
any help would be much appreciated

nb what is an operator and what is an operand

An "operator" is a text string that tells a program to do something.
For instance, the plus sign + is an Operator that tells Access that
you want to add two things.

An "operand" is something acted upon by an operator. For example in
the expression

2 + 3

the operator is "+", and the operands are 2 and 3.
 

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

Top