Field Concatenation (1 Viewer)

wsaccess

Registered User.
Local time
Today, 03:13
Joined
Dec 23, 2015
Messages
38
Hi,

I have a table with First_Name and Last_Name. I have a query to concatenate the 2 fields.
The query is:
Name: [First_Name] & " " & [Last_Name]

When I run the query, the Name field displays only the First_Name.
Strangely, when I double click each row, I can see the concatenated names. But when I move the mouse away, it still displays only the First_Name.

Any ideas, please????

Thanks
 

Minty

AWF VIP
Local time
Today, 03:13
Joined
Jul 26, 2013
Messages
10,371
Name is a reserved word and might be behaving oddly. Try calling it FirstLastName or something else.
 

wsaccess

Registered User.
Local time
Today, 03:13
Joined
Dec 23, 2015
Messages
38
I tried "Full_Name" instead of "Name". But that made no difference
 

JHB

Have been here a while
Local time
Today, 04:13
Joined
Jun 17, 2012
Messages
7,732
Do you have a look up (combo box) set for the field at table level?
Else post your table in a new database, (zip it).
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 10:13
Joined
May 7, 2009
Messages
19,246
do you have format characters in your field or field in your query?
 

wsaccess

Registered User.
Local time
Today, 03:13
Joined
Dec 23, 2015
Messages
38
No Combo Box/Lookup/Format Characters
I tried to copy the table to a new database, and it is the same results!
It is really strange, because I have done concatenation before without any problems...
 

wsaccess

Registered User.
Local time
Today, 03:13
Joined
Dec 23, 2015
Messages
38
Here it is... in zipped file
 

Attachments

  • Names.zip
    35 KB · Views: 40

JHB

Have been here a while
Local time
Today, 04:13
Joined
Jun 17, 2012
Messages
7,732
You've an invisible character (ASCII code = 0) at the end of the names. Add a space or something else in the end and then it works.
You can run an update query where you take the length of the name minus 1, left function.
 

bob fitz

AWF VIP
Local time
Today, 03:13
Joined
May 23, 2011
Messages
4,725
Okay that is weird....
Yes it does seem strange.
I suspect that the problem is with the the data in the table of names because if you examine the length of the a field with Len() it returns a value that is one more than it should be. Also, if you over type a name in the table it works as one would expect it to.

EDIT:
Sorry, didn't see the post by JHB
 

wsaccess

Registered User.
Local time
Today, 03:13
Joined
Dec 23, 2015
Messages
38
You've an invisible character (ASCII code = 0) at the end of the names. Add a space or something else in the end and then it works.
You can run an update query where you take the length of the name minus 1, left function.

Yes, that was exactly the problem and solution...
Thank you very much.....
 

Users who are viewing this thread

Top Bottom