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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top