Set a Section to Visible = False

G

Guest

I have a Special Report where I have Five Total Breaks.

Group0 to Group4

On Group2 if the total of that field is zero, the superintendent does not
want that Section to Print (or be visible).

I tried:

If SchoolTotal < .01 then
Reports!rptWalters.acGroupFooter2.Visible = False
Else
Reports!rptWalters.acGroupFooter2.Visible = True
End If

I am getting an

Application-defined or object defined error.

If anyone knows why it would be greatly appreciated.

Thanx

Len
 
J

John Spencer

You can help us help you by telling us a few more things.

Is "SchoolTotal" a field or a control on your report?

Where did you put the code snippet? Is it in the Report's module or in a
general module?

Which line(s) generates the error? Do you have an error handler in the
section of code that is having problems?
 
G

Guest

Error Lines are:
Reports!rptWalters.acGroupFooter2.Visible = False
Reports!rptWalters.acGroupFooter2.Visible = True

SchoolTotal is Currently a Field in a Table.

The Code is in the Reports Module

Thankx for getting back!

Len
 
J

John Spencer

How about specifying that you want to do this for a section? I should have
seen this right off.

Me.Section(AcGroupFooter2).Visible = False
or
Reports!rptWalters.Section(acGroupFooter2).Visible = False

or even condense that all down to
Me.Section(AcGroupFooter2).Visible = (SchoolTotal >= .01)
 

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