Conditional formatting to be visible or invisible

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.
 
L

Linkerbink

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.
 
A

Afrosheen via AccessMonster.com

Hi Linkerbink,
I was having a similar problem. I have the link here. By reading you may get
the gist of it is doing. I hope this helps


http://www.accessmonster.com/Uwe/Fo...this#gooca553a07nfi9sh0b3llqh7hg52l72t84axcom

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.
 
M

Marshall Barton

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.
 
L

Linkerbink

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.
 
M

Marshall Barton

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.
 
L

Lloyd

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top