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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group Header Trouble

Status
Not open for further replies.

NSGuard

MIS
Jul 15, 2004
29
0
0
US
In a birthday report, I am sorting the birthdays by month. In the group header I have this as the format of the text box:
=Format([txtBirthday],"mmmm")
The information being brought in is from a query and is being sorted/grouped by this action:
=Month([Birthday])
=DatePart("d",[Birthday])

Those sortings work correctly in the query and in the report, the problem is that the group header only prints out January and February.
January is shown and sorts the data correctly under it, then it show and sorts by February and all of the remaing records fall under that heading, and no other headings and sorting occur. So it shows just January and the correct operation, and then Feburary and no other sorting or printing of the group headings/sortings.

Thanks for any help you guys can give.
 
let me get this correct...

in the query, you are using:
SELECT ... Month([Birthday]), DatePart("d",[Birthday])...

and then on the report itself, in the txtBx, you are using:
Format([txtBirthday],"mmmm")

Why not just pass in the entire date in the query, and then sort them out on the report?
 
This is my SQL statement for the Query:
SELECT tblInformation.Birthday, tblInformation.Rank, tblInformation.FirstName, tblInformation.LastName
FROM tblInformation
WHERE (((tblInformation.Birthday) Is Not Null) AND ((tblInformation.CurrentEmployee)=True))
ORDER BY Month([Birthday]), DatePart("d",[Birthday]);


I have tried taking out the ORDER BY and doing the sorting/grouping in the report and it still produces the same results.

 
What is the control source of txtBirthday?
Is there a reason why you didn't use:
=Format([Birthday],"mmmm")

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
I had been using that format.. But I did figure it out or found a way to get what I wanted.

I made Month[Birthday] in the query visible.. took out
the sort in the query, and in the sort of the report made the visible Month[Birthday] my main sort criteria. While I was doing almost the same thing prior, the Month[Birthday] was hidden and not visible in the query datasheet view. Funny how the smallest things make such a difference.

Thanks for the help dhookom!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top