Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combo box combining 2 columns into 1

Status
Not open for further replies.

jeremy0028

Technical User
Oct 9, 2005
37
0
0
US
I have the following table called people

PersonID(pk Autonumber)
LastName
FirstName
Mi
PrimaryInsurance(lookup)
SecondaryInsurance(Lookup)

I have a form called add charge and on that form i have a combo box billed to Which looks up people table personID, PrimaryInsurance,Secondary Insurance

Heres the problem i'm having with the bill to. the combo box is display the Person Primary and Secondary insurance as 2 columns Example Medicare Medical.

I want the combo box to look like this
Meidcare
Medical

In one column not to any ideas.
 
I think a union query might solve your problem.

Along the lines of
Code:
SELECT PersonID, FirstName & " " & Mi & ". " & LastName AS Expr1, PrimaryInsurance 
FROM People
UNION
SELECT PersonID, FirstName & " " & Mi & ". " & LastName AS Expr1, SecondaryInsurance 
FROM People
ORDER BY PersonID;


John




Life is short.
Build something.
 
I tried what you specified but still dosnt work. Here is the code i have in the bill to combo box

SELECT [tblPeople].[PersonID], [tblPeople].[PrimaryInsurance], [tblPeople].[SecondaryInsurance] FROM [tblPeople];
 
Try
Code:
SELECT [tblPeople].[PersonID], [tblPeople].[PrimaryInsurance] FROM [tblPeople]
UNION
SELECT [tblPeople].[PersonID], [tblPeople].[SecondaryInsurance] FROM [tblPeople]
ORDER BY [tblPeople].[PersonID];


Life is short.
Build something.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top