Control source in Unbound Text Box not working

R

rasinc

I have a dumb problem and I am sure it is something simple but I think I have
been staring at it too long.

I have a subform based on query. I want to contactenate a city and
province. The fields are part of the query. I am just running the subform
and the address and postal code work properly. I will be locking the
controls because the address is just for information not for editing.

I put an unbound text box on the form and put the following in the control
source:

=[strCity] & ", " & [strProv]


It is coming up with #Error. Any ideas would be greatly appreciated.
Thanks rasinc
 
R

Rick Brandt

rasinc said:
I have a dumb problem and I am sure it is something simple but I
think I have been staring at it too long.

I have a subform based on query. I want to contactenate a city and
province. The fields are part of the query. I am just running the
subform and the address and postal code work properly. I will be
locking the controls because the address is just for information not
for editing.

I put an unbound text box on the form and put the following in the
control source:

=[strCity] & ", " & [strProv]


It is coming up with #Error. Any ideas would be greatly appreciated.
Thanks rasinc

Divide and conquer. Try each of these by themselves...

=[strCity]
=", "
=[strProv]

Do they all work? Make sure your TextBox name is not the same as either field
used in the expression.
 
R

rasinc

That was it, thanks. The name was the same as one of the fields. I knew it
had to be something simple. I must have put the one field on the form and
then changed the control source without changing the name. Appreciate it.

Rick Brandt said:
rasinc said:
I have a dumb problem and I am sure it is something simple but I
think I have been staring at it too long.

I have a subform based on query. I want to contactenate a city and
province. The fields are part of the query. I am just running the
subform and the address and postal code work properly. I will be
locking the controls because the address is just for information not
for editing.

I put an unbound text box on the form and put the following in the
control source:

=[strCity] & ", " & [strProv]


It is coming up with #Error. Any ideas would be greatly appreciated.
Thanks rasinc

Divide and conquer. Try each of these by themselves...

=[strCity]
=", "
=[strProv]

Do they all work? Make sure your TextBox name is not the same as either field
used in the expression.
 

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