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

GroupHeader Challenge 2

Status
Not open for further replies.

McCloud77

Instructor
Jun 4, 2001
8
CA
The idea is simple as follows:

Regular report with a group header based on the field (Name). This Name group header contains two fields, one is the employee Number and the other is the Name field itself.

The Detail section contains some fields based on a query.

The question is:

Thru VBA code, how can I change the group header from the Name field to some other field (lets say JobLocation) keeping the Number and Name fields in the new group header as before. I'm trying to make a multi-purpose report that changes its grouping field based on a selection from another form.

Thanks folks...

McCloud
 
I have searched for an answer to this one for a LONG time, and have never been successful. If you find something, please let me know.

Joe Miller
joe.miller@flotech.net
 
I haven't used them in a while, and I can't find any examples of mine, but look in Access help for the CreateGroupLevel function and the GroupLevel property.....
 
Thanks Cosmo! That's a new function I've never seen before, have a star. Joe Miller
joe.miller@flotech.net
 
Sorry, I didn't finish in the past reply.

About the CreateGroupLevel function, you can use this function while the report is opened in design view, but you definitly need more code to add the specified fields in this new group header. Also I could find no way to delete a group from the report so as to change the grouping field.

Mwafag
 
To delete a group set the RecordSource = "".

Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top