display record in listbox

T

tim johnson

I have a list box that contains many records with each
record having a unique ID (primary key)

How can I go to a specific record in the listbox using
the primary key as the search criterion.

What I would like to do is to have an unbound combobox on
this form where the value of any record selected will be
the primary key and use the after update event of the
combobox as to lookup the record and display it.

This is similar to selecting the first letter of a
listbox column and the cursor jumps to that record.

Thanks


Thanks
 
R

Roger Carlson

Well, if you want to set the value of a listbox to that of a combo box, in
the AfterUpdate event, you put something like this:

me.MyListbox = me.MyComboBox

Now if you would rather have a textbox above the listbox and have the
listbox find the value as you type into the textbox, look at the Access
Developer's Handbook (by Getz, et al). There is an example there.

--Roger Carlson
www.rogersaccesslibrary.com
 

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