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

Dynamic Grouping in VBA 1

Status
Not open for further replies.

NSNewey

Programmer
Joined
Jun 29, 2005
Messages
125
Location
GB
Hi

Is it possible to set which field a report is grouped on in the report module code?

I have a report generator form which the user selects various filters to view a report of Customers. I want to be able to set the grouping of the report based on the users filter selection. In other words, if the user has filtered by County, I want to group on town. If the user has filtered on Country, I want to group on County etc.

I have opened the reports module and in the Report_Open event cannot see in the intellisence options anything other than Me.GroupHeader(0) which I cannot assign the control source to.

If this is possible, I would also like a text box in the group header to display the appropriate value (ie the town name or county name etc)

Any help will be much appreciated.

Neil
 
Works a treat thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top