Birthday Report by Month Wierdness

L

Lostguy

Hello all.

Here is what I did:

1) Set up a query with LName, FName, DOB, BirthMonth: Month([DOB]),
and BirthDay: Day([DOB]).

2) Make a report based on this query grouped by BirthMonth and sorted
by BirthDay.

3) On the report, change the format of the BirthMonth textbox to
"mmmm".

For some reason, the first month on my report is "December" and then
ALL the other months say "January". (December, January, January,
January, January, etc.)

When I look at the query, it is correctly pulling out the month (1 for
January, 2 for February, etc.), but on the report, February and all
following months have a displayed name of "January".

Any help appreciated on how to fix this!

V/R

LostGuy
 
G

Guest

Debug.Print Month(#1/1/1954#) = 1
Debug.Print CDate(1) = 12/31/1899
Therfore:
Debug.Print Format(Month(#1/1/1954#),"mmmm") = December

Debug.Print Month(#6/7/1954#) = 6
Debug.Print CDate(6) = 1/5/1900
Therfore:
Debug.Print Format(Month(#6/7/1954#),"mmmm") = January

In a nutshell Month returns an integer from 1 through 12. The number 1 as
seen as a date is 12/31/1899. Numbers 2 though 12 are seen as the first few
days of January 1900.
 
G

Guest

Lostguy,

Change your control's ControlSource from BirthMonth to DOB, keeping your
specified formatting.

Sprinks
 
L

Lostguy

TADA!!

Bravo Zulu to Sparks!

(That did it. Thanks for the help!)

V/R

LostGuy (but getting better with help)
 

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