Conditional visibility

M

Mike Mc1981

Hi,

I have a text box in a form called "tracking database" and another called
"document hyperlink", how do I design a form so that when tracking database
is set to "no" document hyperlink is invisible and when tracking database is
set to yes it is visible?

Cheers

Mike
 
J

Jeff Boyce

Mike

You could add code behind the control for [tracking database] that evaluates
its contents and sets the visible property of the [document hyperlink]
control.

From a usability standpoint, you might want to consider making the [document
hyperlink] control Enabled/Disabled instead of having it wink in and out of
visibility.

Your code could look something like:

Me.[document hyperlink].Enabled = (Me.[tracking database] <> "no")

(you did say it was a text control, right? If it were a Yes/No-type
control/field, you'd need to change that code)

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/
 
Top