Filter subform by mainform Combo box

G

Guest

I have a main form set up with two cascading combo boxes in the header
section of the form; cboBaseComm and cbo SecComm. cboSecComm filters
dependent on cboBaseComm. (this filter works fine)

In the details section of the form I have a subform that gives vendor
commodity information. I would like this subform to filter based on the
SecComm chosen in the combo box in the main form.

The main form and sub form are linked by SecCommID. I thought I understood
how to create filters based on controls within a form, but it seems I either
get all of the detail info, or none.

Any ideas on how to troubleshoot this?

Thanks,
 
G

Guest

You could try using the after update from the combo:

Mainform!subform!filter=me.combobox
Mainform!subform!filteron=true

Or you could set a reference in the query from the subform

Maurice
 
G

Guest

In the subform Query I have the criteria for the SecCommID set as
forms!mainform!cboSecComm.
But this is turning up zero results.

In the subform After Update I have Me.cboSecComm.Requery
 

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