Filtering Based on data from Subform

P

PJ

Hi All,

Is it possible to filter records from main form by selecting data from
subforms? Please give me some hint. Thanks in advance.

Do I have to build a search function or is there a simple way?

Thanks.
 
P

PJ

Thanks Jeanette,

The filtering works now. I also have a clear filter button and coded like
this:

cboFilterSub.value = Null
me.Requery

This clear button works fine for other combo in the main form. But for this
subform filter based on the code from the link below, it only clear the
value. I cant get my query to requery to null criteria. Please give some
guidance. Thank you
 
P

PJ

I don't know if this is good coding or not, but in the clear filter button,
i put this code below and everything is working now. Thanks.

me.recordsource = "qryMain"
 
J

Jeanette Cunningham

Great - just what was needed.

You could also have put something like
Me.FilterOn = False

Jeanette Cunningham
 

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