filter a listbox

D

david

Hi,
i have made a form where i have 4 combolistbox (named: BOX1, BOX2, BOX3,
BOX4) and a listbox (Named: LIST1, it is based on a table).
i want to filter the data in the listbox by selecting some filter criteria
in one of the 4 combolistboxes.

i have tried to find out what to do, but i can't make anything of the
solutions to work.

I hope someone can help me with my problem.
 
M

Maurice

David,

Why not base your listbox on a query. Within the query you can reference the
comboboxes. In the after update of the combobox you can place a
me.listbox.requery which will requery the source of the listbox.

So in the query place the following in the criteria field of the combo (id
field): forms!formname!box1

In the after update of the box1 place: me.list1.requery

Ofcourse you must place the wildcards in the query if the user wants to see
all.

hth
 
D

david

i want the listbox to show all post in the form, also after i have activate
an filter criteria. is it posible without using a subform?

"Maurice" skrev:
 
D

david

"Maurice" skrev:
David,

Why not base your listbox on a query. Within the query you can reference the
comboboxes. In the after update of the combobox you can place a
me.listbox.requery which will requery the source of the listbox.

So in the query place the following in the criteria field of the combo (id
field): forms!formname!box1

In the after update of the box1 place: me.list1.requery

Ofcourse you must place the wildcards in the query if the user wants to see
all.

hth
 

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

Similar Threads

coding possibility? 2
Record Matching 1
Pivot Table Question 2
Calculation 2
Access Cannot select items in listbox 1
Populating a Combo Box with other control values 6
Blank fields 1
Just can't get it to work 2

Top