Report Sections - Controls

P

Paul Ilacqua

What is the proper method to hide / show either sections or controls within
sections of a reprt through VBA. Some say use twips some say use strings.
What is the proper method and should I use twips or inches. My setup
defaults to inches.

Paul
 
M

Marshall Barton

Paul said:
What is the proper method to hide / show either sections or controls within
sections of a reprt through VBA. Some say use twips some say use strings.
What is the proper method and should I use twips or inches. My setup
defaults to inches.


Use the Visible property.

Me.Detail.Visible = False
or
Me.sometextbox.Visible = False

If you want them to show on some records and be hidden on
other records, don't forget to make it Visible too.

If somecondition Then
Me.sometextbox.Visible = True
Else
Me.sometextbox.Visible = False
End If

or more succinctly:
Me.sometextbox.Visible = (somecondition)
 
F

fredg

What is the proper method to hide / show either sections or controls within
sections of a reprt through VBA. Some say use twips some say use strings.
What is the proper method and should I use twips or inches. My setup
defaults to inches.

Paul

The usual method to hide or show report sections or controls is to
simply make them visible or not.
Me.[ControlName].Visible = False or True (A Control]
Me.Section(0).Visible = False or True (Detail Section)
Or you can use the Cancel argument in the control's Format event to
not show that section.

Now if this isn't what you mean, perhaps you should post back with a
bit more detail of what it is you a trying to do.
 
P

Paul Ilacqua

It's a report with optional comments below the main record in the detail
section, if the request form's show comments box is checked then the detail
section's height would be x to accommodate the extra comments text box and
label, if the box is not checked it would be y a "shorter" version of the
detail section etc....
Thanks
Paul


fredg said:
What is the proper method to hide / show either sections or controls
within
sections of a reprt through VBA. Some say use twips some say use strings.
What is the proper method and should I use twips or inches. My setup
defaults to inches.

Paul

The usual method to hide or show report sections or controls is to
simply make them visible or not.
Me.[ControlName].Visible = False or True (A Control]
Me.Section(0).Visible = False or True (Detail Section)
Or you can use the Cancel argument in the control's Format event to
not show that section.

Now if this isn't what you mean, perhaps you should post back with a
bit more detail of what it is you a trying to do.
 

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