filtering list box

TanMan

Registered User.
Local time
Today, 10:47
Joined
Oct 15, 2010
Messages
16
I have a form that uses a list box to select records. I have added a 2 radio button group that filters the records according to a check box
What I would like to have happen is when selecting a radio button to filter the records I also need to filter the list box to match the list of records filtered
 
Change your listbox rowsource to be

currentrowsource WHERE radbuttonfield =[Forms]![Form1]![Text3]

current rowsouce is whatever you have at the moment
radbuttonfield is the field that matches to your rad button
radbutton is the name of your radio button

Alternativley open the query for the listbox and use the build function for the criteria

you will also need to add to your radbutton afterupdate event the following code

listbox.requery

where listbox is the name of your listbox
 
sorry, got that slightly wrong

currentrowsource WHERE radbuttonfield =[Forms]![Form1]![Text3]

should be

currentrowsource WHERE radbuttonfield =[Forms]![yourform]![radbutton]

uourform is the name of the form with the listbox and radbutton
 

Users who are viewing this thread

Back
Top Bottom