Replace empty values

I

Igor G.

How to replace empty text boxes in report with "-" ?
I must in my reports to replace all empty places.
Thanks!
 
D

Duane Hookom

By "empty" I assume you mean Null. You can change your control sources to:
=Nz([Field Name],"-")
You may need to change the name of each of these controls so that the name
is not the name of a field.
 
O

OfficeDev18 via AccessMonster.com

Igor,

I assume the text boxes are all bound to fields in the Record Source. If so,
for only those fields that can be blank, change the Control Source for that
control to read

=Nz(MyFieldName,"-")

It may not work properly for numeric fields.

You must also change the control name, as the control is no longer bound to
the 'pure' contents of the field. Rename the control, for example,
txtMyFieldName.

Hope this helps,

Sam
 
I

Igor G.

Thanks,
working fine with text and numeric fields.
Now, I have hundrets textboxes for correction. :)
 
D

Duane Hookom

You can set all your numeric text boxes at the same time by selecting them
and setting the Format property so that null values display as "-". Check
Help for "Format Property Numeric".
 
Top