Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Hi I have a problem where the user has a form in MSAccess. The form contains information about the client. The client fields are – client’s first name, client’s last name, their street address, suburb and city, their landline number and their cell phone number and their email address.

However the user does not always want to see the email address and would like to have a button that will show or hide the email address.

I have to write a set of instructions that will solve this problem. Can anyone help??

share|improve this question

1 Answer 1

Code for your button, in the OnClick event

Private Sub cmdEmailToggle_Click()
Me.txtEmail.Visible = Not (Me.txtEmail.Visible)
End Sub

this makes it a simple toggle - it sets the visible property to the opposite of what it currently is

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.