Filter List Box (1 Viewer)

Joe2056

New member
Local time
Today, 11:12
Joined
Mar 3, 2017
Messages
2
Hi all,

im new to working with databases and access and need a little help. What I need help with is filtering a list box. Here is an overview of what I have and what I need to happen.

I have 2 tables, the first table is CustomersData and the second is WorkData. Then I have 1 form called DataForm.

On DataForm I have a drop down list that shows all the data from CustomersData, but I have all the columns hid except their names. After picking a customer from the list it then populates a selection of text boxes wither the rest of their information.

One of those text boxes is called CustomerIDText. I then have a list box that lists all the data from WorkData, but all the columns are hide except for the date. After selecting a date it populates a selection of text boxes with the work information for that date.

at the moment the list box shows all dates for all customers. In both tables I have a column for CustomerID.

So what I need is the list box to automatically filter the dates to match the customer id from the CusotmerIDText.

Please can anyone offer some help I have been trying to work this out for a couple of days now.
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 14:12
Joined
Apr 27, 2015
Messages
6,321
Do a search in this forum for Cascading Combo boxes.
 

Joe2056

New member
Local time
Today, 11:12
Joined
Mar 3, 2017
Messages
2
I have tried searching this forum but I cant seem to find what im looking for.
 

missinglinq

AWF VIP
Local time
Today, 14:12
Joined
Jun 20, 2003
Messages
6,423
The concept NauticalGent mentioned is called "cascading comboboxes" although the exact same thing applies to Listboxes with the MultiSelect Property set to None, and the code is interchangeable. Here are a couple of good links with examples:

Cascading List for Access Forms

Cascading Combo/List Boxes

Also, if you Google the term "Cascading Comboboxes" along with "MS Access" you'll probably get a gazillion hits!

Linq ;0)>
 

Users who are viewing this thread

Top Bottom