filter listbox from a cbo box.

N

New_Access

Hi All,
I'm trying to sort my list box value through a combo box.So
in the criteria row of the list box query builder,I put the below
line:
[Forms]![Select model_frm]![cbo_fourdigitsmodel] & "*"

Perhaps by doing that I will filtering the list box values but
I'm not success.I think there is a problem with that asterisk,
what is the correct one?

And also,when open the form where the list box is,
the pop up form appear first and prompt me for the combo
values.How to prevent that?

We have to open the form first,and find the cbo box then
choose it value and the list box filtered.How to do that in
correct ways.

Thank's before
 
A

Al Campagna

New,
Let's just handle the List filtering by Combobox for now...

In your Listbox RowSource query, use this criteria...
LIKE [Forms]![Select model_frm]![cbo_fourdigitsmodel] & "*"
This tells the List to display any value in that list that has the
first 4 digits of cbo_fourdigitsmodel. It may have more digits
after that, but it must have those first four.

Note:
Use the AfterUpdate event of cbo_fourdigitsmodel to
ReQuery the Listbox, so that any change in cbo_fourdigitsmodel
causes a "Re-Synch" with your Listbox.
Also, use the OnCurrent event of the form to
Requery the ListBox, so the Listbox is always in "synch"
as you Browse from record to record.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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