how to retrieve multiple colums from a table using a listbox?

S

schultzwf

Access 2007- form
I am using a lookup file with multiple columns.

I use the table to populate a listbox.

I want to have the user click on an entry and retrieve multiple columns from
the lookup table.

For example:
Choosing 'physical exam' from listbox and i want to retrieve pay type, code,
and fee columns from the lookup table
 
B

Beetle

You can retrieve values from combo/list box columns by referring
to the Column property. It is a zero based index, so Column(0) is
the first column, Column(1) is the second, etc.

For example, a text box on your form could have a Control Source like;

=[lstyourListBox].Column(3)

or you could refer to it in code like;

Me![lstyourListBox].Column(3)
 

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