Connecting Tech Pros Worldwide Forums | Help | Site Map

Filter a subform based on a list box

Newbie
 
Join Date: Jul 2009
Posts: 4
#1: Jul 23 '09
I'm relatively new to access, and I'm trying to create a form where if I click on a selection of a list box the subform below it will be filtered automatically on click (I was hoping I didn't need a seperate "Filter" command button on the side, but I guess that would work just as well).

The list box is titled List46, and has two columns (let's just say column A and column B), and the subform is titled [Query1 Subform2], and has 10 columns that are based on a previous query of 3 tables. I would like it so that the subform would filter so that it's second column would match column A from the list box once I click on the listbox.

Can anyone help me? I would be so grateful. Thank you!

Expert
 
Join Date: Jul 2008
Location: Maryland
Posts: 1,176
#2: Jul 23 '09

re: Filter a subform based on a list box


Use the Link Master Fields and Link Child Fields of the subform properties. In Link Master Fields, put the name of the list box control. In Link Child Fields, put the name of the Field in the subform. Then, only records with a field value equal to the value of the list box will be displayed.
Newbie
 
Join Date: Jul 2009
Posts: 4
#3: Jul 23 '09

re: Filter a subform based on a list box


Thank you so much that was extremely helpful
Reply