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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with listbox

Status
Not open for further replies.

madrappin

Technical User
Mar 16, 2004
68
US
I am using code that to fill the rowsource of a listbox, however 2 of the fields that I am using are comboboxes that pull their lists from another table. So when the listbox displays it shows ID value rather than the value selected from the table. How would I set up the listbox to display other than the ID? If it would help for me to post the code, let me know. Thanks.
 
The field stores the ID. The lookup is just what you see. Take a look here for some of the other Evils of Lookup Fields in Tables.

With or without changing the table fields to "normal", I think you would need to include/join the tables where the information resides to create your listbox rowsource.

Roy-Vidar
 
Well, I am a little confused because the relationships are all setup, and if I use SQL in a query to see those fields, the lookup still works. However when I use that exact same SQL in the rowsource, it is giving me what the field stored. Is there another way to write the SQL to make the lookup field work correctly?
 
Sorry to post twice in a row, but this whole "thinking things through" thing is not my strong suit...
Would it make more sense to not use any lookup fields in the table at all, and just use them in forms when needed? or would that still create the same problems?
 
He he - I was seconds away from posting something real grumpy ;-)

What you say, is what most professionals would say, and what's also stated in the article I linked to. Do not use them! Use combos on forms in stead!

For a somewhat lengthy (and heated) discussion re Table Level Lookups thread700-876257. What you experience is the way those **** things work (or as I would rather say, fail to work;-)).

You need to include the "description" field from your other tables, not the ID field.

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top