Group Header Visible Toggles

G

Guest

I am using Access 2002.

I have a report with a GroupHeader0 with subtotals in it. I would like to
make this header's Format / Visible property toogle between yes and no, based
on the value in a field SECTION_CODE. If SECTION_CODE = "01", then Visible =
Yes, if SECTION_CODE <> "01" then Visible = No.

I have been messing with this for four hours and no luck...
 
M

Marshall Barton

Rebecca_SUNY said:
I am using Access 2002.

I have a report with a GroupHeader0 with subtotals in it. I would like to
make this header's Format / Visible property toogle between yes and no, based
on the value in a field SECTION_CODE. If SECTION_CODE = "01", then Visible =
Yes, if SECTION_CODE <> "01" then Visible = No.


The group header can only refer to value in the group's
first record. If the grouping is on the section code field,
then you can simply use either:
Cancel = (Me.SECTION_CODE = "01")
or
Me.GroupHeader0.Visible = (Me.SECTION_CODE = "01")

in the group header section's Format event procedure.
 
G

Guest

Worked like a charm. The grouping was NOT on Section_Code, it was grouped on
a different field. Section_Code was also not it in the group header...but
this code still worked. (as an event procedure).

Thanks.
 

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