Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to create a report that list birthdays by the month 3

Status
Not open for further replies.

Pineland

Programmer
Jun 4, 2002
4
0
0
US
I need to create a report that groups records by birthday but ignores the year of birth. My records use the short date format 00/00/00. The purpose of the report is to have someone send birthday cards throughout the year easily. I can get around in Access but I am not knowledgeable about visual basic or SQL.
 
pretty simple.
On the report section click sorting and grouping icon.
Select the date field you want to group, then where it shows:
group header
group footer
group on
group interval
keep together

select group on
select month and away you go....
since its a date field access understands the grouping options.
 
EasyTarget: Have a star. Never new about this easy way of grouping on a portion of a date field. Always performed a DatePart in the query to pick off the Month and then Sorted and Grouped by that new field.

Thanks for the insight.

Bob Scriver
 
Thank you for your reply. The method you describe is actually what I have done but the year of birth is not ignored and all months within 1950 are sorted and then 1951,etc. I need all dates sorted, regardless of the year, by the month.
 
Oh well not that clear on what you are trying to do...

Ok
goto the properties of the report
goto recordsource on the data tab,
Click the query builder button.

when the query window pops up
on the table you are trying to select click the (*) to select all records.
then select an empty field, and select the build icon.
for the expression put in
=month([fld_birthday_date]) --- replace with approriate field name.
then go back to the report and use the sorting & grouping to group on Expr1

That should work.
 
Thank you EasyTarget and scriverb. Your tips worked beautifully and my report is now sorted by month and I was able to get the birthdays to display in chronological sequence. Now if I could ask your help in refining the report so that it displays the month in a header? For example.
January
Bob Jones January 10, 1962
Steve Johnson January 21, 1955
February
Martha Stewart February 10, 1971
March
Rod Stewart March 12, 1949
etc.
And can I have the date display in the above format?
 
In the Sorting and Grouping window click on the row with the Date. Now select Group Header below and select Yes.

You will now have a Group Header section above your detail section. Create a Text Box for the Month and in the Control Source enter the following:

Format([TableName].[DateFieldName], "mmmm")

This should help you with your formating of your report.

Bob Scriver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top