List Box display ID no in Target Field instead of Data

Bradon

Board Regular
Joined
Dec 18, 2002
Messages
66
I have 2 tables, Comments holding 6 comment banks of 10 rows and Student Data which holds 6 columns designated to receive the comment highlighted in the listbox.

The listbox works correctly in transmitting details of the data selected but displays the ID number of the row holding the data from the related table and not the actual data as required.

Any suggestions?
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
In the design of the table select the field with the lookup and select the "Lookup tab" on the lower left. Here are the specs for what is displayed and what goes into the field.

Ziggy
 
Upvote 0
Thanks Ziggy,

I am a bit puzzled - the box shows the field set as a text box with no options showing. When I change it to a list box I get the following showing:
Display: List Box
Row Source: Table/Query
Bound Column: 1
Column Count: 1
Column Heads: No

I am completely lost as to what goes where. Data originates from a table called "Comments" and the field I want to display it in is in a table called "Student Data"

Any Suggestions?
 
Upvote 0
You did do all this with the Lookup wizard right?

There should be something in the "Row Source" like:

SELECT DISTINCTROW [tblComments].[Comment] FROM [tblComments];

If the wizard puts in the ID you can edit the statement to put in the field you want to display.

The "Row source type" would show: Table/Query (don't get confused between the 2)

Ziggy
 
Upvote 0

Forum statistics

Threads
1,221,543
Messages
6,160,422
Members
451,644
Latest member
hglymph

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top