Using command button to Hide or Show Object

Majid Umar

Registered User.
Local time
Today, 20:17
Joined
Aug 2, 2001
Messages
22
Need help on how to control an Object (Calendar) so, on click of a button user will be able to view and when click button again or deselect make it invisible.
 
You should be able to modify this to work:

Private Sub Command130_Click()

If Me!frmLoggedOn.Visible = False Then
Me!frmLoggedOn.Visible = True
Else
Me!frmLoggedOn.Visible = False
End If

End Sub

When the command button is clicked it first checks to see if the object is visable. If not, it makes it visible. If so it leaves it invisable. In my case I am using a subform named frmLogged on but it should work with any object.
 
Me!ControlObject.Visible = Not(Me!ControlObject.Visible)
 

Users who are viewing this thread

Back
Top Bottom