Conditional formatting to be visible or invisible

  • Thread starter Thread starter Linkerbink
  • Start date Start date
L

Linkerbink

In a report, I want a particular control to be visible only when the value is
more than zero. I used the conditional formatting for the control and set it
to the expression:
IIf([Reg]>0,[Reg],"") but it doesn't work. I tried doing it without the IIf
but that doesn't work either. What am I doing wrong? TIA.
 
Linkerbink said:
In a report, I want a particular control to be visible only when the value is
more than zero. I used the conditional formatting for the control and set it
to the expression:
IIf([Reg]>0,[Reg],"") but it doesn't work. I tried doing it without the IIf
but that doesn't work either. What am I doing wrong? TIA.
I forgot to add that there are 9 of these controls on the report, so I want
to be able to do this on each control individually.
 
Linkerbink said:
In a report, I want a particular control to be visible only when the value is
more than zero. I used the conditional formatting for the control and set it
to the expression:
IIf([Reg]>0,[Reg],"") but it doesn't work. I tried doing it without the IIf
but that doesn't work either.

Conditional Formatting does not deal with visibility.

Your expression would be appropriate as a text box's
ControlSource expression as long as the text box is named
something other than [Reg]

But since this is more a formatting issue than a
calculation, it would be better to use a custom format
something like:
0;;;""
See Format Property in VBA Help for details on creating
custom formats.
 
Well, thanks for all the replies. Unfortunately, I'm a newbie at Access and
your responses are beyond my comprehension! I'll see what I can figure out.

Marshall Barton said:
Linkerbink said:
In a report, I want a particular control to be visible only when the value is
more than zero. I used the conditional formatting for the control and set it
to the expression:
IIf([Reg]>0,[Reg],"") but it doesn't work. I tried doing it without the IIf
but that doesn't work either.

Conditional Formatting does not deal with visibility.

Your expression would be appropriate as a text box's
ControlSource expression as long as the text box is named
something other than [Reg]

But since this is more a formatting issue than a
calculation, it would be better to use a custom format
something like:
0;;;""
See Format Property in VBA Help for details on creating
custom formats.
 
I made a mistake in my suggested Format property setting. I
meant to say:

0;"";""
--
Marsh
MVP [MS Access]

Well, thanks for all the replies. Unfortunately, I'm a newbie at Access and
your responses are beyond my comprehension! I'll see what I can figure out.

Marshall Barton said:
Linkerbink said:
In a report, I want a particular control to be visible only when the value is
more than zero. I used the conditional formatting for the control and set it
to the expression:
IIf([Reg]>0,[Reg],"") but it doesn't work. I tried doing it without the IIf
but that doesn't work either.

Conditional Formatting does not deal with visibility.

Your expression would be appropriate as a text box's
ControlSource expression as long as the text box is named
something other than [Reg]

But since this is more a formatting issue than a
calculation, it would be better to use a custom format
something like:
0;;;""
See Format Property in VBA Help for details on creating
custom formats.
 
You might try setting the can shrink value to 'yes' in the control's property
sheet-format tab,
--
Lloyd


Linkerbink said:
Well, thanks for all the replies. Unfortunately, I'm a newbie at Access and
your responses are beyond my comprehension! I'll see what I can figure out.

Marshall Barton said:
Linkerbink said:
In a report, I want a particular control to be visible only when the value is
more than zero. I used the conditional formatting for the control and set it
to the expression:
IIf([Reg]>0,[Reg],"") but it doesn't work. I tried doing it without the IIf
but that doesn't work either.

Conditional Formatting does not deal with visibility.

Your expression would be appropriate as a text box's
ControlSource expression as long as the text box is named
something other than [Reg]

But since this is more a formatting issue than a
calculation, it would be better to use a custom format
something like:
0;;;""
See Format Property in VBA Help for details on creating
custom formats.
 
Back
Top