Applying filters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a treeview that I want to be a filter for a subform.
I mean, that the subforme should be filtered by the node selected in the
treeview.
I do not how can i do that because DoCmd.ApplyFilter should be executed
throu a button, i guess.

Please, help!!

Thanks a lot, Lina
 
Hi Alex

I did download the splitter, but I could not find where the filter for the
subform is.

Can you help me wit this?

Thanks a lot, Lina
 
Hi Lina,
yes, you right, I made it long ago, and there I use a different approach
anyway - what you can do:
in a Node_Click event you get build a filter string, for example
sftFilter="CategoryID=" & intCategoryID
intCategoryID - you get from clicked node
and then you apply this filter to subform using it filter property:

me.frmProductsDetail.form.Filter=strFilter
me.frmProductsDetail.form.FilterOn=True

HTH
 
Hi Alex

Almost done!
I have this in a node_click event:
strFilter = "IdCmpny=" & Mid(nSelectedNode.Key, 2)
Me.frm_SalesBase.Form.Filter = strFilter
Me.frm_SalesBase.Form.FilterOn = True

But the form is asking me for the value of IdCmpny.

So, I have been doing soe thing wrong, don't I?

Thanks a lot, Lina
 
Back
Top