Making a Report with all Personnel by their Birth month

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to create a Report every month with the people that
their birthday is in that month. I would like to type the
month that I want to print. Help please
 
I need to create a Report every month with the people that
their birthday is in that month. I would like to type the
month that I want to print. Help please
As criteria for the report:
Where Month([BirthDate]) = [Enter the month number]

You will be prompted to enter the month.
Has the advantage of being able to run the Birthdates in advance of
the month.

If you wish to ONLY get the birthdates within the current month, then
use
Where Month([BirthDate]) = Month(Date())

No need to enter any parameters.
Has the disadvantage of not being able to be run in advance of the
month.
 
-----Original Message-----
I need to create a Report every month with the people that
their birthday is in that month. I would like to type the
month that I want to print. Help please
.
Instead of a text box, why not use a list box on your
form. It's probably easier for your user and eliminates
typographical errors.

Use the Wizard to create the list box. Make the source a
table with two fields: MonthID (long integer) and
strMonth (text). The SQL is SELECT [tblMonth].[MonthID],
[tblMonth].[strMonth] FROM [tblMonth] ORDER BY
[MonthID];. Leave the bound column as 1, which is MonthID.

Base your report on a query which contains the birthdate
field and whatever other fields you want. Do a calculated
field in the query, MyMonth: Month([BirthDate]) and a
criteria for that field of [Forms]![frmSelectMonth]!
[lstMonths].

The On Click event of the list box calls the report, using
something like:
Private Sub lstMonths_Click()
Dim stDocName As String
stDocName = "rptBirthday"
DoCmd.OpenReport stDocName, acPreview
End Sub

Roxie Aho
roxiea at usinternet.com
 
I need to create a Report every month with the people that
their birthday is in that month. I would like to type the
month that I want to print. Help please

Without knowing anything about your table structure, I'm going to have
to grope in the dark a bit; but you can create a Query with a
calculated field:

BirthMonth: Format([DOB], "mmmm")

where DOB is the employee's date of birth. Put a criterion on this of

[Enter month:]

and base your Report on the query. If you type "January" at the
prompt, you'll see all January birthdates.

You might also want to have the actual birthday anniversary as a date
field; if so put in another calculated field:

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

This can be displayed and/or used for sorting the birthdays
chronologically.
 
Back
Top