Birthday Query

E

eskili32

Hi,
I am having a real problem with birthday queries. Just started using
access
a week ago.
I tried to enter a criteria of 12 then december dec*, nothing works.

1. List all your contacts who have birthdays in December or are over 30

years old.
2. All people who you have birthday data sorted by last name.
3. Use Access to provide the SUM of individuals on the list.
4. Group birthdays by month
 
J

John Vinson

Hi,
I am having a real problem with birthday queries. Just started using
access
a week ago.
I tried to enter a criteria of 12 then december dec*, nothing works.

1. List all your contacts who have birthdays in December or are over 30

years old.
2. All people who you have birthday data sorted by last name.
3. Use Access to provide the SUM of individuals on the list.
4. Group birthdays by month

Posting the exact same message half a dozen times is not necessary or
helpful.

And it sounds like you're posting homework questions. Are you?

A Date/Time value is actually stored as a number - a count of days and
fractions of a day (times) since midnight, December 30, 1899. It's not
a string, so a criterion of 12 would find only people born on January
10, 1900.

Try putting two calculated fields in the query by typing the following
in two vacant Field cells in the query:

BirthMonth: Month([DOB])

assuming that your date of birth field is named DOB. This will contain
values 1 through 12 for the month.

Age: DateDiff("yyyy", [DOB], Date()) - IIF(Format([DOB], "mmdd") >
Format(Date(), "mmdd"), 1, 0)

which will be the person's age as of their last birthday. These
fields will help you answer questions 1, 2 and 4. I have no idea what
you mean by "the SUM of individuals" - people aren't numbers, and
AFAIK cannot be summed up by any silly computer program! <g>

John W. Vinson[MVP]
 
E

eskili32

John said:
Hi,
I am having a real problem with birthday queries. Just started using
access
a week ago.
I tried to enter a criteria of 12 then december dec*, nothing works.

1. List all your contacts who have birthdays in December or are over 30

years old.
2. All people who you have birthday data sorted by last name.
3. Use Access to provide the SUM of individuals on the list.
4. Group birthdays by month

Posting the exact same message half a dozen times is not necessary or
helpful.

And it sounds like you're posting homework questions. Are you?

A Date/Time value is actually stored as a number - a count of days and
fractions of a day (times) since midnight, December 30, 1899. It's not
a string, so a criterion of 12 would find only people born on January
10, 1900.

Try putting two calculated fields in the query by typing the following
in two vacant Field cells in the query:

BirthMonth: Month([DOB])

assuming that your date of birth field is named DOB. This will contain
values 1 through 12 for the month.

Age: DateDiff("yyyy", [DOB], Date()) - IIF(Format([DOB], "mmdd") >
Format(Date(), "mmdd"), 1, 0)

which will be the person's age as of their last birthday. These
fields will help you answer questions 1, 2 and 4. I have no idea what
you mean by "the SUM of individuals" - people aren't numbers, and
AFAIK cannot be summed up by any silly computer program! <g>

John W. Vinson[MVP]



Thank you very much. This actually was a homework due last week, so I
had to change and force the data so it would work. However I wanted to
know how it is done since I couldn't figure it out how it is done
properly.
Again, thank you.
 

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