Nice, I didn't know you could use this syntax:
Me![Control1].Visible = Me![Control2] = X
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/9539-which-form-event-would-i-use.html
I'm presently using an If Then statement.
There are actually three values of Control2 that should set Control1 to not
visible. Could I then use:
Me![Control1].Visible = Me![Control2] = X Or Me![Control2] = Y Or
Me![Control2] = Z
?
"fredg" wrote:
> On Fri, 12 May 2006 10
02 -0700, Ricter wrote:
>
> > I want to make control1 on my form not visible if control2 = X. I have this
> > code in the Exit event of control2. Additionally, I am also carrying forward
> > the value of Control2 to new records. This works fine until I begin cycling
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9539
> > through records without exiting control2. Of course when I do that, the last
> > state of control2 when it was exited is applying to all records.
> >
> > I believe I need to attach my code to the form, so that when I cycle through
> > records, control2 is looked at and control1 is visible, or not.
> >
> > What I don't know is what form event do I use?
>
> A better event than the Exit event would be the AfterUpdate event.
> Anyway place the same code in the Form's Current event:
>
> Me![Control1].Visible = Me![Control2] = X
>
> (if X is a number, or ="X" if X is Text)
> --
> Fred
> Please respond only to this newsgroup.
> I do not reply to personal e-mail
>