Apply Filter Help??

G

Guest

Hi all,
I have form with a sub form in a DataSheet view. What I would like to do is,
filter one field so only the data matching that field will display in the
subform (datasheet view) within the main form. Is this possible? So I will
have a drop down box on the main form and when I select this it should filter
the subfomr with the appropiate data. Can anyone help?
Thanks
 
A

Allen Browne

If it's just the one combo on the main form, you can do that just by setting
the Link Master Fields property of your subform to the name of the combo,
and the Link Child Fields property to the matching subform field. No code
needed. (If nothing is selected in the combo, the subform will show
nothing.)

If you want to be able to filter your form by different fields, this might
help:
Find as you type - Filter forms with each keystroke
at:
http://allenbrowne.com/AppFindAsUType.html
The idea is that you choose a field to filter by (combo), and then enter a
value to match (text box), and it filters the form as you type. You don't
need to make any changes to the code to get it to work with your form: just
copy'n'paste, and set one property.
 

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

Top