Combobox not displaying what I want

M

Mark G

I have a combobox on a form that when an item is clicked on, it opens up the
record that corresponds with that chosen criteria which works fine. The
problem I am having is that when the combobox is activated instead of names
it has numbers however, when I view the records from the row source in the
SQL statement:Query builder window it lists the names as I would like to see
them. Any help would be apreciated.

Here is the SQL statement that I am using:

SELECT [Trade Form].ID, [Trade Form].[Request Date], [Trade Form].[Trade
Requested By], [Trade Form].[Trade Accepted By]
FROM [Trade Form];

The [trade requested by] and [trade accepted by] are comboboxes on the form
that use the records from tblpersonnel.

Thanks
Mark
 
M

Maurice

Looks like a case of showing the keycolumn instead of the textcolumn.
Look in the properties of the combobox and see if the number of columns is
set to two. Then look at the columnwidth there should be two values there. If
you don't want the numbers from the first column to be shown you should set
the first value to 0 (zero).

So columnwidth coul look something like this: 0;2,5

Maurice
 
M

Mark G

Mi Maurice, Thanks for replying so quickly

I have a column count of 4 and column widths of 0;1";1";1" and a list width
of 3". I think the numbers that are showing up for the names are their
primary key numbers, but when I view the SQL statement: query builder it
lists the names as I want them

Maurice said:
Looks like a case of showing the keycolumn instead of the textcolumn.
Look in the properties of the combobox and see if the number of columns is
set to two. Then look at the columnwidth there should be two values there. If
you don't want the numbers from the first column to be shown you should set
the first value to 0 (zero).

So columnwidth coul look something like this: 0;2,5

Maurice

Mark G said:
I have a combobox on a form that when an item is clicked on, it opens up the
record that corresponds with that chosen criteria which works fine. The
problem I am having is that when the combobox is activated instead of names
it has numbers however, when I view the records from the row source in the
SQL statement:Query builder window it lists the names as I would like to see
them. Any help would be apreciated.

Here is the SQL statement that I am using:

SELECT [Trade Form].ID, [Trade Form].[Request Date], [Trade Form].[Trade
Requested By], [Trade Form].[Trade Accepted By]
FROM [Trade Form];

The [trade requested by] and [trade accepted by] are comboboxes on the form
that use the records from tblpersonnel.

Thanks
Mark
 
J

John Spencer

Sounds like a possible case of LOOKUP fields. The values (names) are not
the values stored (numbers).

If you have used a Lookup field in the table, you will need to join the
table that is the source of the lookup fields and return the appropriate
column for the "lookup" table.

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================


Mark said:
Mi Maurice, Thanks for replying so quickly

I have a column count of 4 and column widths of 0;1";1";1" and a list width
of 3". I think the numbers that are showing up for the names are their
primary key numbers, but when I view the SQL statement: query builder it
lists the names as I want them

Maurice said:
Looks like a case of showing the keycolumn instead of the textcolumn.
Look in the properties of the combobox and see if the number of columns is
set to two. Then look at the columnwidth there should be two values there. If
you don't want the numbers from the first column to be shown you should set
the first value to 0 (zero).

So columnwidth coul look something like this: 0;2,5

Maurice

Mark G said:
I have a combobox on a form that when an item is clicked on, it opens up the
record that corresponds with that chosen criteria which works fine. The
problem I am having is that when the combobox is activated instead of names
it has numbers however, when I view the records from the row source in the
SQL statement:Query builder window it lists the names as I would like to see
them. Any help would be apreciated.

Here is the SQL statement that I am using:

SELECT [Trade Form].ID, [Trade Form].[Request Date], [Trade Form].[Trade
Requested By], [Trade Form].[Trade Accepted By]
FROM [Trade Form];

The [trade requested by] and [trade accepted by] are comboboxes on the form
that use the records from tblpersonnel.

Thanks
Mark
 
M

Mark G

That was it. Thank you very much

John Spencer said:
Sounds like a possible case of LOOKUP fields. The values (names) are not
the values stored (numbers).

If you have used a Lookup field in the table, you will need to join the
table that is the source of the lookup fields and return the appropriate
column for the "lookup" table.

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================


Mark said:
Mi Maurice, Thanks for replying so quickly

I have a column count of 4 and column widths of 0;1";1";1" and a list width
of 3". I think the numbers that are showing up for the names are their
primary key numbers, but when I view the SQL statement: query builder it
lists the names as I want them

Maurice said:
Looks like a case of showing the keycolumn instead of the textcolumn.
Look in the properties of the combobox and see if the number of columns is
set to two. Then look at the columnwidth there should be two values there. If
you don't want the numbers from the first column to be shown you should set
the first value to 0 (zero).

So columnwidth coul look something like this: 0;2,5

Maurice

:

I have a combobox on a form that when an item is clicked on, it opens up the
record that corresponds with that chosen criteria which works fine. The
problem I am having is that when the combobox is activated instead of names
it has numbers however, when I view the records from the row source in the
SQL statement:Query builder window it lists the names as I would like to see
them. Any help would be apreciated.

Here is the SQL statement that I am using:

SELECT [Trade Form].ID, [Trade Form].[Request Date], [Trade Form].[Trade
Requested By], [Trade Form].[Trade Accepted By]
FROM [Trade Form];

The [trade requested by] and [trade accepted by] are comboboxes on the form
that use the records from tblpersonnel.

Thanks
Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top