Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 03-03-2017, 04:21 AM   #1
Joe2056
Newly Registered User
 
Join Date: Mar 2017
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Joe2056 is on a distinguished road
Exclamation Filter List Box

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.

Joe2056 is offline   Reply With Quote
Old 03-03-2017, 04:44 AM   #2
NauticalGent
Pristine Curmudgeon
Gold Supporter
 
NauticalGent's Avatar
 
Join Date: Apr 2015
Location: Naples, Italy (EXPAT from Virginia)
Posts: 2,032
Thanks: 457
Thanked 302 Times in 261 Posts
NauticalGent has a spectacular aura about NauticalGent has a spectacular aura about NauticalGent has a spectacular aura about
Re: Filter List Box

Do a search in this forum for Cascading Combo boxes.
NauticalGent is offline   Reply With Quote
Old 03-03-2017, 05:10 AM   #3
Joe2056
Newly Registered User
 
Join Date: Mar 2017
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Joe2056 is on a distinguished road
Re: Filter List Box

I have tried searching this forum but I cant seem to find what im looking for.

Joe2056 is offline   Reply With Quote
Old 03-03-2017, 05:17 AM   #4
NauticalGent
Pristine Curmudgeon
Gold Supporter
 
NauticalGent's Avatar
 
Join Date: Apr 2015
Location: Naples, Italy (EXPAT from Virginia)
Posts: 2,032
Thanks: 457
Thanked 302 Times in 261 Posts
NauticalGent has a spectacular aura about NauticalGent has a spectacular aura about NauticalGent has a spectacular aura about
Re: Filter List Box

Here are two sources I have used in the past:

http://www.fmsinc.com/microsoftacces...cascading.html
https://access-programmers.co.uk/for...d.php?t=223980
NauticalGent is offline   Reply With Quote
Old 03-03-2017, 05:17 AM   #5
missinglinq
AWF VIP
 
missinglinq's Avatar
 
Join Date: Jun 2003
Location: Richmond (Virginia that is!)
Posts: 6,320
Thanks: 11
Thanked 721 Times in 671 Posts
missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light missinglinq is a glorious beacon of light
Re: Filter List Box

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)>

__________________
The Devil's in the Details!
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


(All code solutions tested in Access 2003/2007, before posting, unless otherwise noted.)
missinglinq is offline   Reply With Quote
Reply

Tags
drop down list , filter , list box , text box

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter List Box from other list box selections nosferatu26 Forms 4 07-15-2015 01:29 PM
list box report and list box filter thatlem Forms 8 03-13-2009 10:03 AM
How to filter a list ? Sogood Forms 2 08-24-2008 10:05 PM
List box filter elfranzen Forms 10 02-08-2008 01:40 PM
Filter using List box raisbecp Forms 2 04-30-2003 08:01 AM




All times are GMT -8. The time now is 06:31 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World