Concatenating data in a table = How?

Ghoztrider

Registered User.
Local time
Today, 15:27
Joined
Mar 11, 2011
Messages
12
I have a simple table setup with 4 columns which are from left to right:

last name,first name, id, Full name

I want to have the "full name" column display data from both the last name & first name columns. I'm using the full name column to populate a combobox in a form. I can concatenate in a query, not sure how to do it strictly in a table. Thanks in advance!
 
Not sure I understand the rationale. If you have a table with FirstName and LastName, why would you want a field within that table for the concatenation of FirstName&LastName?

You could use a query to concatenate the values for the combo.
 
That concatenated field would populate a combobox on another form not attached to this table. I do have a parameter query setup for the above mentioned table, but when I try to have that populate the combobox it asks for the "parameter", which I don't want for the combobox I'm trying to get working. I figured creating a fourth column with the combined names would be easier and not interfere with my param query.
 
That concatenated field would populate a combobox on another form not attached to this table. I do have a parameter query setup for the above mentioned table, but when I try to have that populate the combobox it asks for the "parameter",
Then let's deal with that and fix the problem instead of using a bad practice to get around it.

... which I don't want for the combobox I'm trying to get working. I figured creating a fourth column with the combined names would be easier and not interfere with my param query.
Maintaining that field can be a nightmare. So, you use it in a query.

Let's work through your query issue first.

So,

1. Why are you attempting to use a parameter query for the rowsource of a combo box?

2. What is the parameter that is necessary for this to work?
 
1. Why are you attempting to use a parameter query for the rowsource of a combo box?

This table will serve two purposes:

A) Parameter query set for the "LastName" field for easy information retrieval (I don't want to use a param query for the combobox. I tried out of desperation.:confused:

B) A field would be available for use in another form (The combobox that I want to set up with fname & Lname together.)

2. What is the parameter that is necessary for this to work?
LastName

I just tried setting up a new query that used an expression to combine the first and last name which worked, but when applying it to my combobox I only get the first name regardless of what column I bind it to.
 
I just tried setting up a new query that used an expression to combine the first and last name which worked, but when applying it to my combobox I only get the first name regardless of what column I bind it to.

So to fix that is easy -

Make sure the combo properties listed here are filled out appropriately:

Column Count (needs to be the total number of fields in the query if you want them all to be available to the combo or anything referencing the combo)

Column Widths
Use Zero (0") if you don't want a column to show and a non zero value to show one. So if you have a query with

Select Something.MyID, Something.MyLastName & ", " & Something MyFirstName As FullName, MyLastName
FROM xTable

then you want to show only the full name you would have a column count of 3 and column widths of
0";2";0"
 
My world is right again! That worked perfectly. Thanks Mr. Larson!
 

Users who are viewing this thread

Back
Top Bottom