Simple field concatenation in subform (1 Viewer)

cpampas

Registered User.
Local time
Today, 08:22
Joined
Jul 23, 2012
Messages
218
I am sure this shoud be something realy simple , but I cant see it:

in a subform i have a control bound to a field [country] another control bound to [city], it works fine but now i want to concatenate both in one control

=[country] & "-" & [city] ' the country appears blank

why is country in the control source diferent from =[country]
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:22
Joined
Oct 29, 2018
Messages
21,358
Try using the name of the control, rather than the name of the field it is bound to.
 

Ranman256

Well-known member
Local time
Today, 11:22
Joined
Apr 9, 2015
Messages
4,339
try:
=me.country & "-" & me.City
 

cpampas

Registered User.
Local time
Today, 08:22
Joined
Jul 23, 2012
Messages
218
When following theDBGuy sugestion, to refer to the control rather than the field, I noticed that one of my label names was already in use "country", therefor
the field name was not being recognized
Thanks for your help
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:22
Joined
Oct 29, 2018
Messages
21,358
When following theDBGuy sugestion, to refer to the control rather than the field, I noticed that one of my label names was already in use "country", therefor
the field name was not being recognized
Thanks for your help
Congratulations! Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Top Bottom