Hide data while grouping in a report

G

Guest

I have Access 2003. I've written a report which groups the records by
MATTERNO similar to the following:

Group 1 Title
P91506US01 Process for Alcohol
P91506US02 Process for Alcohol
P91506US03 Alcohol
P91506US04 Process for Alcohol

Group 2 Title
P91803US01 Pimary Alcohol
P91803US02 Pimary Alcohol

Group 3 Title
P92108US01 Process for Bleach
P92108US02 Process for Bleach
P92108US03 Bleach Process

I need the report to only show the Title for the first item in each group
because not all the titles are the same and the title for the parent MATTERNO
(eg the one that ends in "01") is all I want to see.

Group 1 Title
P91506US01 Process for Alcohol
P91506US02
P91506US03
P91506US04

Group 2 Title
P91803US01 Pimary Alcohol
P91803US02

Group 3 Title
P92108US01 Process for Bleach
P92108US02
P92108US03

Can anyone suggest some code which will do this or something I can set in
the report which will do this.

Thanks in advance!
 
G

Guest

One method would be to place a text box in the detail section:
Name: txtCountGroup
Control Source: =1
Running Sum: Over Group
Visible: No
Then add code to the On Format event of your detail section:
Me.txtTitle.Visible = (Me.txtCountGroup=1)
This assumes your group title text box is named txtTitle.
 
G

Guest

Duane,

Thank you for your prompt response. That didn't quite work because now some
of the titles which should be there are not appearing.

And, some of the ones appearing in when I previewed the report, were not
showing up once I Publish It with Microsoft Office Word or exported it to
excel.

Thanks, LDMueller
 
G

Guest

I didn't see any previous mention of sending to Word or Excel. If this is a
requirement, you will probably need to use a different method. If it isn't a
requirement, my solution should have worked. I can't see your screen or
report groupings or anything else that might allow me to troubleshoot your
issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top