Access form textbox expression builder

K

KNIX

I have two fields in my db, one is a long integer, the other is text. I
want to display them concatenated in a textbox on a form (i.e. intNumber & "
" & txtWords). When I enter the expression in that way, I get "#Name?" as
an error. I can't see that I'm doing anything wrong in the expression
builder (it doesn't give any issues when I close it, the error appears only
when I view the form in Form view). Anyone know how I can get the integer
to appear as a string so it will live happily with the text?
 
A

Andy Hull

Hi

You need to add an equals sign at the beginning...

= intNumber & " " & txtWords

For your info, cstr(intNumber) would convert intNumber into a string but
Access will do the conversion automatically for you in this particular case.

hth

Andy Hull
 
K

KNIX

Thanks, Andy. I tried that, but it didin't work, however, it occurred to me
to try it in the underlying query, and just use the resulting field, and that
works fine. Now, as to why it doesn't work in the source for a text box,
but will in the query builder, who knows. Thanks agains.
 

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

Top