filter form based on subform

G

Guest

I have a form I am showing in datasheet view. The users are using this to
filter and do a find and replace on certain fields, so if I do a continuous
form they cannot do this so I am stuck with the datasheet view. I have some
fields that if I add them to the query it becomes unupdateable, so I put
these in a subform and linked to the main form. How can I get the user do a
filter on this subform and have it filter the main form also
 
G

Guest

Hi Cynthia,

If the subform is using the same set of data (ie: the filters are the same),
you can set an On Filter event of your subform that sets the parent form's
filter like this:

me.parent.filter = me.filter
me.parent.filteron = true

Hope this helps.

Damian.
 
G

Guest

The field I need to filter on is a calculation and if I add that field to the
main form it is not updatable, that is why I had to create the subform. The
subform has a field called percentfill and one called allowablefill, I want
the user to be able to filter where the percentfill is > 100 and have the
main form only show records with a matching link to the subforms filtered
child link. Is this possible or do I need to output the percent fill to a
table and use this to filter by.
 

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