list of birthdays

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

I want to be able to print a list of all of the people in
my database that has a birthday that month. I can find
out who they are by using the vba code:

Me.bday = Format([Date Of Birth], "m") - Format(Date, "m")

It returns 0 then they have birthday that month else they
don't. I can put that on the oncurrent event but I need
to have it so that I have a complete form/report that
just has the people that is having a birthday that month.
Should I use a report and if so what event and how can I
limit it to just the people that is having a birthday.
 
1. Create a query to use as the source of the report.

2. Type this into the Field row of your query:
Month([Date Of Birth])
and in the Criteria row under this, enter:
Month(Date())

3. In another column of the Field for of the query, enter:
DayOfMonth: Day([Date Of Birth])

When you create your report, you can then sort the entries by entering
DayOfMonth into the Sorting And Grouping dialog (View menu in report design
view).
 
Back
Top