Button to toggle text box visibile

LeeSmith

Registered User.
Local time
Today, 17:03
Joined
Mar 17, 2006
Messages
27
Hi there

Sorry if this is a 'n00b' question. I have a text box on a form that I want to make visible or invisible by clicking a button.

This is my current code:

If Me.txt4Comments.Visible = False Then Me.txt4Comments.Visible = True

End If
Exit Sub


ElseIf Me.txt4Comments.Visible = True Then Me.txt4Comments.Visible = False

End If
Exit Sub

This may be a very simple problem but i'm relatively inexperienced so any help would be appreciated.
 
This code will make it toggle:
Code:
Me.txt4Comments.Visible = Not Me.txt4Comments.Visible
 
Thank you very much, worked a treat :)
 

Users who are viewing this thread

Back
Top Bottom