Accessing correct Combo box column from Query (1 Viewer)

spidey1

New member
Local time
Today, 11:18
Joined
Jan 4, 2008
Messages
3
Hi everyone,

I have a combo box that is populated from a table called tblProducts.
There are only three fields ID, Model and Description in this table.

ID is the primary key field and is an Autonumber

In the form when a user selects a product from the combo box the "Model" fields is displayed which is how I want it.

I am doing a query that should show the "Model field however when I run the query it shows the "ID" field which is useless information for the end user.

How do I show the correct field in the query?
 

ted.martin

Registered User.
Local time
Today, 10:18
Joined
Sep 24, 2004
Messages
743
Have you tried specifying in the combo properties the Coumn Count and Column Width parameters. For example, evn though the 'bound' column will be Column 1 (ID), to show the Model in the combo, set Column Count = 2 and Column Width to 0cm; 3cm
Hopefully this will do what you require.
 

spidey1

New member
Local time
Today, 11:18
Joined
Jan 4, 2008
Messages
3
Hi Ted,

I tried your advice, but it still displays the ID field in the query. However now it displays the ID field in the form as well.
I'm not sure why this is happening.
 

ted.martin

Registered User.
Local time
Today, 10:18
Joined
Sep 24, 2004
Messages
743
zip the file and post it so I can see what you mean. Just a few lines of data will do so copy the file and delete most of the table entries
 

MStCyr

New member
Local time
Today, 06:18
Joined
Sep 18, 2003
Messages
333
Set your column widths to 0", 1", 1" so that column 1 will be hidden
 

spidey1

New member
Local time
Today, 11:18
Joined
Jan 4, 2008
Messages
3
I have, the ID column is hidden and it displays the correct field in the combo box on the form. It's just when I run the query it shows the ID column for some reason.
 

neileg

AWF VIP
Local time
Today, 11:18
Joined
Dec 4, 2002
Messages
5,975
Have you joined tblProducts into your query so you can pull the model field instead of the ID?
 

Users who are viewing this thread

Top Bottom