merge problem with null fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All
Please excuse me as I am a beginner. I have a form created from a query the
query can have up to 30 null fields (ie no fax number, no company name etc).
When I merge to a word template from this form I would like to exclude the
fields that are null. Currently when it is merged there are labels with no
data, the users have to delete all the null fields and so errors have occured
and it is time consuming. Any help with his is greatly appreciated.

Many Thanks
 
Create a report in Access with the fields laid out the way you want.

For any field that could be null, set its CanShrink property to Yes.

If the field has an attached label, right-click the label and Change To |
Text box. Then enter an expression into the Control Source of this control,
and set its Can Shrink property to Yes as well. The expression for the
quazi-label for the Fax field would be:
=IIf([Fax] Is Null, Null, "Fax:")

Run the report, and the null fields and their labels will shrink (assuming
there is nothing else overlapping them vertically.) You can then use the
Office Links button on the toolbar to export to Word.
 
Thanks Allen

That was a big help, it did the trick - time consuming for me but a least
this should eliminate any errors.
Thank you very much.
Kez

Allen Browne said:
Create a report in Access with the fields laid out the way you want.

For any field that could be null, set its CanShrink property to Yes.

If the field has an attached label, right-click the label and Change To |
Text box. Then enter an expression into the Control Source of this control,
and set its Can Shrink property to Yes as well. The expression for the
quazi-label for the Fax field would be:
=IIf([Fax] Is Null, Null, "Fax:")

Run the report, and the null fields and their labels will shrink (assuming
there is nothing else overlapping them vertically.) You can then use the
Office Links button on the toolbar to export to Word.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Kez said:
Hi All
Please excuse me as I am a beginner. I have a form created from a query
the
query can have up to 30 null fields (ie no fax number, no company name
etc).
When I merge to a word template from this form I would like to exclude the
fields that are null. Currently when it is merged there are labels with
no
data, the users have to delete all the null fields and so errors have
occured
and it is time consuming. Any help with his is greatly appreciated.

Many Thanks
 
Back
Top