IIf Visible Statement

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

I'm trying to write an IIf statement and it doesn't seem to be working.

=IIf([MenuDay]=1,[Text17].Visible=True,[Text17].Visible=False)

I'm putting this on the control of [Text17]

Thanks
DS
 
You'll have to put code elsewhere.
Me!Text17.Visible = (Me!MenuDay = 1)

I'd suggest placing this code in the form's Current event, and in MenuDay's
AfterUpdate event.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
I would suggest the same...

Your confusion is that IIF must return a value and not execute something so,
your statement with IIF would be:

Me!Text17.Visible = IIf(Me!MenuDay=1,True,False)

Again, I too prefer the Graham's aproach

Mauricio Silva

Graham R Seach said:
You'll have to put code elsewhere.
Me!Text17.Visible = (Me!MenuDay = 1)

I'd suggest placing this code in the form's Current event, and in MenuDay's
AfterUpdate event.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
---------------------------

DS said:
I'm trying to write an IIf statement and it doesn't seem to be working.

=IIf([MenuDay]=1,[Text17].Visible=True,[Text17].Visible=False)

I'm putting this on the control of [Text17]

Thanks
DS
 
Mauricio said:
I would suggest the same...

Your confusion is that IIF must return a value and not execute something so,
your statement with IIF would be:

Me!Text17.Visible = IIf(Me!MenuDay=1,True,False)

Again, I too prefer the Graham's aproach

Mauricio Silva

:

You'll have to put code elsewhere.
Me!Text17.Visible = (Me!MenuDay = 1)

I'd suggest placing this code in the form's Current event, and in MenuDay's
AfterUpdate event.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
---------------------------

I'm trying to write an IIf statement and it doesn't seem to be working.

=IIf([MenuDay]=1,[Text17].Visible=True,[Text17].Visible=False)

I'm putting this on the control of [Text17]

Thanks
DS
I took your Advice(s) and put it on the "ONCurrent" property using the
code that you suggested and that worked fine. Thank you, everyone.
DS
 
Back
Top