>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)

Signature
Marsh
MVP [MS Access]
> 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.

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Paul Ilacqua - 19 Apr 2008 19:27 GMT
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
>> What is the proper method to hide / show either sections or controls
>> within
[quoted text clipped - 13 lines]
> 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.