In a report there is a field that has values in about half the records. I
want the report to show either a bottom line border or a border around the
whole field only when the field is blank. Can this be done? If so, how?
Ed
Try something like this in the ControlSource:
=IIF(IsNull(MyField), "_______________", MyField)
Make sure you change the name of the control on the report to
something other than your field name, so you don't get a circular
reference. Maybe something like txtMyField_UnderlineIfNull.
This assumes your fields are actual Null when you say "blank".
To have underlines whether your field is Null or Zero Length String,
you can use this instead:
IIF(MyField & "" = "", "_______________", MyField)
This is a cheap and easy way, but you need to set the correct number
of underline characters so it looks right.
A bit more difficult way is to set border properties for each empty
field in code in the On Format event of the section.
Armen Stein
Microsoft Access MVP
www.JStreetTech.com