Form combobox help needed

BBK

Registered User.
Local time
Today, 13:27
Joined
Jul 19, 2010
Messages
71
I have a form which has a drop down box which has a list of names the i enter through another form.

In the drop down box it lists the names by last name, first name with a small divider between the last and first name, last name being to the left of the divider, first name being to the right of the divider.

When i select/click a name i want to enter into the box it only adds the last name of the selected person. How can i get it to add both the First and Last name into the box.

The code on the box i have is as follows:
Code:
SELECT [Tenant].[TenantID], Tenant.[LastName], Tenant.[FirstName] FROM Tenant ORDER BY [LastName], [FirstName];

Any help in solving this problem would be greatly appreciated. I hope i have provided enough and relevant info about the issue.

Thank you in advance for any help provided.
 
Well, first of all, you shouldn't be storing the name to begin with. You should be storing the ID of the name.

Second, you can make the combo show both names by using a concatenated field:

SELECT [Tenant].[TenantID], Tenant.[LastName] & ", " & Tenant.[FirstName] As FullName FROM Tenant ORDER BY [LastName], [FirstName];
 
Thank you very much bob for the help.

Lesson learned and noted.

Thank you once again for the help you provided, greatly appreciated.
 

Users who are viewing this thread

Back
Top Bottom