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??


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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