View Single Post
  #4  
Old December 18th, 2006, 02:19 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Use Combo Box to select record in List Box

Yes, it is possible. The first order of business it the row source of the
list box must be a value list. It it is currently a query, you will need to
write a procedure that uses the query as a recordset so you can use the
AddItem method to load the list box initially. You would use the form's Load
event to do this.

Then, to add the content of the combo, use its After Update event And the
AddItem method to append the value to the list.

Me.MyListBox.AddItem(Me.MyComboBox)

"Ron Weaver" wrote:

Thanks for your response. I really want to click on a name in the Combo Box
which will in turn select that record in the list box. Is this not possible?

" wrote:


Ron Weaver wrote:
I have a search form that looks up customers by name and by date. I am using
List Boxes for this. The customer names are growing to a point that I would
like to add a Combo Box to the search by names (sort of a quick find). I
would like to click on a name in the Combo Box that would select that record
in the customer name List Box (List18). I am an amateur at this. Thanks for
any help.


I think it's only point you at the record when it's match with the
first char on the name. Here is some ideal how i would attach this
problem

I have the combo box which run the SQL to get all the names with
criteria (search value = null or search value like Name. then i have a
unbounce box which i let the user to enter the search value. IT's only
visible when the user click on the search button.

Here is how it work... First when you open the form the combo box will
give you all the names becuase the search value = null. If the user
want to search for a specific name then click on the search and the
unbounce box popup so they can enter the search value as a string. The
requery the combo box they will see only the one they're looking for.
Hope i'm making some sense but i think it's only see the first
character on the combo box for example
CCAAAAA
CBAAAAA
CCCCCCC
C9898999
B234567
When you're type the C without in the combo box it will point you at
the first record start with the C. But if you want to get the record
start with CB you can't not becuase as soon as you hit the "C" then "B"
it will give you the record start with the B. That's how combo box
work and once again i hope i'm giving you some ideal. GL.