Hide the Detail section (1 Viewer)

cedtech23

Registered User.
Local time
Today, 04:15
Joined
Jan 28, 2006
Messages
25
I currently use
Code:
Me!frmPatientLookupResults.Form.Visible = False

to hide a subform on my form that is in the detail section of my form.


Is there a way to collapse or Hide the Detail section of the main Form??

I notice that their is a property under the Detail section called Visible
with an option for Yes or No.. How would I manipulate that option through
VBA? I am assuming that is the option that I am looking for
 

cedtech23

Registered User.
Local time
Today, 04:15
Joined
Jan 28, 2006
Messages
25
I tried

Code:
Me.Detail.Visible = False

But no luck. I am looking to collapse that section
 

Adrianna

Registered User.
Local time
Today, 04:15
Joined
Oct 16, 2000
Messages
254
cedtech,
I assume that you want it to disappear when there is no data in the subform or not to appear until the user has selected something from the main form. I asked this questions that tried several things. Eventually I ended up setting the CAN GROW and CAN SHRINK properties to Yes and then set the height of the detail section to zero until my criertia was met!

Me.Detail.Height = 0

But it sounds like you're working with a report.
 

cedtech23

Registered User.
Local time
Today, 04:15
Joined
Jan 28, 2006
Messages
25
I am working with a form and subform but I will try your approach
 

Users who are viewing this thread

Top Bottom