Control source in Unbound Text Box not working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
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.
 
Back
Top