Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I format one specific field in a large expression?

Status
Not open for further replies.

micereza

Technical User
Jul 27, 2002
14
US
Help I've got a huge problem that I've been trying to figure out for weeks.

Let's say I have an expression like this in my report:

IIf(IsNull([AddressLine1] Or [AddressLine1] = " "), "", [AddressLine1] & vbCrLf) & IIf(IsNull([AddressLine2] Or [AddressLine2] = " "), "", [AddressLine2] & vbCrLf) & IIf(IsNull([AddressLine3] Or [AddressLine3] = " "), "", [AddressLine3])

How do I make the one field [AddressLine1] bold when it appears in the report without making the rest of the fields in the expression bold as well.
 
This equation is very similar to the answer posted by CosmoKramer in Thread thread703-321976. His suggestion to use this equation works really well but to do what you want to do, I don't think can be done within a single text box. The properties of the text box are either Bold or not Bold.

Now I really like the IIF equation that you are using but it won't work if you want the AddressLine1 to be bold and the other AddressLines to be non-bold.

You should use the suggestion that I made to create three text boxes, one for each AddressLine and bound to the table field names and set their Can Grow properties to Yes and their height to 0. Set the Font Weight to Bold for the AddressLine1 text box. The other two should be set to normal. Now this will leave you with a 3 text boxes that looks like a very thin lines. Place this tight together right up under your Name( I am assuming you have a text box for the Name).

Now depending upon the data available from your record any of the three text boxes will display their data depending upon whether there is data. The Can Grow property allows them to expand and display and the AddressLine text box if it has data will be bold.

Hope this helps you. Bob Scriver
 
Bob,

Thanks for the prompt response. I'll test it out and get back to you.

Take care
MC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top