Showing/ Hiding controls at runtime

winshent

Registered User.
Local time
Today, 23:40
Joined
Mar 3, 2008
Messages
162
I want to show/ hide a sub report..

I can do it easily by setting the visibility using a global variable.. eg

Private Sub Report_Open(Cancel As Integer)
Me.Controls("rptBlockWindowsDetail_Sub").Visible = gShowSubReport
end sub

I would like to control this based on the value of a checkbox.. i tried this but an error says the checkbox control has no value..

Private Sub Report_Open(Cancel As Integer)
Me.Controls("rptBlockWindowsDetail_Sub").Visible = Me.Controls("chkWindows").value
end sub

Anyone got any ideas ?
 
You might try the format event of the section containing the controls instead of the open event.
 
No problem; glad it worked for you.
 

Users who are viewing this thread

Back
Top Bottom