How to Concantinate Strings and Fields in Report Text Box

  • Thread starter Thread starter Mike Thomas
  • Start date Start date
M

Mike Thomas

This one must be simple but it drives me crazy.

One of the fields in a query populating a report is named "Log Number"

I want to show the following, for example, in a text box in the report page
header band -

Log # 12345.0 -- Damaged Parts

So I put this into the text box ControlSource property -

="Log # " & Str([Log Number]) & " - - Damaged Parts"

It generates the "#ERR" message in the report. The field name is ok, because
when I put it alone in the text box, I get the Log Number only.

Many thanks
Mike Thomas
 
If [Log Number] is already 12345.0, use this:
="Log # " & [Log Number] & " - - Damaged Parts"

If you need to add the decimal and 0, use this:
="Log # " & Format([Log Number],#####.0") & " - - Damaged Parts"
 
Make sure the control is not named Log Number. Change its name to txtLogNumber
or some other value that is not the name of one of the fields.
 
Back
Top