Link Textbox to Listbox

C

CCD

Is it possible to select a value in a listbox and have a value from a
different table displayed in a listbox.

Ex: Listbox contains part numbers

When a part number is selected in the listbox the supplier name will be
displayed in the textbox

Thanks
 
T

Tom van Stiphout

On Thu, 14 Jan 2010 18:17:01 -0800, CCD

Yes. Here is one cool way to do this: the listbox is filled using a
query, right? Then add a column to that query indicating the supplier
name. On the listbox control increase the number of columns, and user
the ColumnWidth property to set the new column to 0 width, thus hiding
it.
Then create a textbox and set the ControlSource to:
=myListbox.column(2)
(of course you replace myObjectNames with yours, and you replace 2
with whatever number your new column is (counting starts at 0).

-Tom.
Microsoft Access MVP
 

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