How To Create A Subform

larrytxeast

New member
Local time
Today, 14:38
Joined
Sep 5, 2015
Messages
7
Subform: Make "Friendly" Combo Boxes

I am not sure if this would be a query question or a form question, but the ultimate destination for what I'm doing, and where I'm designing it, is in a subform.

I have a combo box on a subform. It links to a table with people's names. I want it to "plug" their autoID field but show their names, and there are 2 fields for name, first and last.

Now, I have managed to get it to show it this way in the drop-box as you're making your selection, however it then only shows the first name when you're done, rather than showing the first and last name joined together.

The combo box is based on a table like so:

Name: tblGuests
Field Names: autoID, FirstName, LastName, GuestType

The combo box in the subform, its "bound" column is 1 (autoID), which is right, and it in fact does properly "plug" the autoID of the person into the table this subform is based on. HOWEVER, once done, it only shows the first name while the last name is hidden. In the property sheet of this combo box in design view, the format tab and the column count and column width attributes, I have it showing 3 columns and then the width is 0 (autoID) .5 and .5 (for the names). In the "data" tab, the "control" source is tblGuests, bound column is 1.

The only way I know of to fix this would be to make a view-only query of this table, add a "concatenated" field that concatenates the first and last name, and then have this be one of the columns viewed instead of first and last name.

Tips?
 
Last edited:
The concatenated field is one way, this is another:

Thanks, I may try that out sometime. I solved the problem by creating a query, concatenating the 2 names in a "full name" field, and basing the combo box on that. (I could be really fancy, view the query in SQL, and then copy-paste the SQL in the recordsource of the combo box so as to reduce "query clutter.")

It's amazing I remember any of this, including various bits of code, after being dormant all of these years.

Again, how do I mark the question "solved?"
 
No problem. Solved solution on your other thread.
 

Users who are viewing this thread

Back
Top Bottom