Reference all fields on a form

  • Thread starter Thread starter TimW
  • Start date Start date
T

TimW

I have about 90 different fields on a form (for reporting
purposes) that need to conditionally formatted to white if
they are equal to zero.

I had successfully done this conditional formatting, but
somehow Access 2002 undid my conditional formatting.
Because you can only do this one field at a time, I would
like to do something like the following On Current:

foreach [fieldonform as key]
if [key]==zero set white else set black
next

Is there a way to do this in a neat little package?

Thanks
 
I was mistaken about doing one at a time.

I was using a right click to access the conditional
formatting, and when on multiple selections, this option is
removed. It is however, still available under format.
 
TimW said:
I have about 90 different fields on a form (for reporting
purposes) that need to conditionally formatted to white if
they are equal to zero.

I had successfully done this conditional formatting, but
somehow Access 2002 undid my conditional formatting.
Because you can only do this one field at a time, I would
like to do something like the following On Current:

foreach [fieldonform as key]
if [key]==zero set white else set black
next

Is there a way to do this in a neat little package?


You don't need to use Conditional Formatting to hide zero
values. The Format property for numeric values can have
four different parts, one each for positive, negative, zero
and Null values. For example, if your values are integers,
you can use a format like:

#,##0;-#,##0;"";"Unknown"

to display nothing instead of zero and the word Unknown for
Null.

See the Format Property in Help for details.
 
Back
Top