Combining Formula and Text question

  • Thread starter Thread starter codwilco
  • Start date Start date
C

codwilco

Pretty simple. Why does this work (="Dear "+[EmpName]+",") and this does
not(="Count: "+Count(EmployeeDetail!SSN))? The second returns #Error. And
yet, if I remove the text, the Count function works just fine. I just need
the two combined.

Thanks,
Dave
 
Try an ampersand:
="Count: " & Count(EmployeeDetail!SSN)

The plus sign is ambiguous. It can mean concatenation (for text) or
summation (for numbers.) Your second example tries to combine a text and a
number, so Access got confused about which to do and errored out.

If you really want to use the plus, you could use Str() to force the number
to string:
="Count: " + Str(Count(EmployeeDetail!SSN))
 
Back
Top