Access Report - Bolding Field within an Expression

J

jagfan

Guest
I have a text box in a report that contains an expression. This expression in part prints two separate addresses, one for home and one for a work address. I want to be able to bold the home address information to distinguish it from the work address. Below is the code for the expression. I want to be able to bold the fields Addr1, Addr2, Addr3, Addr4, City, State and Zip if they exist.

=IIf(IsNull([Title]),"",[Title] & Chr(13) & Chr(10)) & IIf(IsNull([BName]),"",[BName] & Chr(13) & Chr(10)) & IIf(IsNull([BAddr1]),"",[BAddr1] & Chr(13) & Chr(10)) & IIf(IsNull([BAddr2]),"",[BAddr2] & Chr(13) & Chr(10)) & IIf(IsNull([BAddr3]),"",[BAddr3] & Chr(13) & Chr(10)) & IIf(IsNull([BCity]),"",[BCity] & ", ") & IIf(IsNull([BState]),"",[BState] & " ") & IIf(IsNull([BZip]),"",[BZip] & Chr(13) & Chr(10)) & IIf(IsNull([Addr1]),"",[Addr1] & Chr(13) & Chr(10)) & IIf(IsNull([Addr2]),"",[Addr2] & Chr(13) & Chr(10)) & IIf(IsNull([Addr3]),"",[Addr3] & Chr(13) & Chr(10)) & IIf(IsNull([Addr4]),"",[Addr4] & Chr(13) & Chr(10)) & IIf(IsNull([City]),"",[City] & ", ") & IIf(IsNull([State]),"",[State] & " ") & IIf(IsNull([Zip]),"",[Zip])

Thanks for your help in advance.

JF
 
jagfan said:
Below is the code for the expression. I want to be able to bold the fields Addr1, Addr2, Addr3, Addr4, City, State and Zip if they exist.
Hi,
I don't think you can do that in Access. If you were querying for a web page you could just append <B> </B> tags around your fields; but in an Access report I'm pretty sure the entire text field needs to have the same text properties. Your best bet would probably be separate fields.

Good Luck!
 
Back
Top