Setting the Filter property on subform 
Author Message
 Setting the Filter property on subform

Would anyone know how to set the Filter property on a subform. If I type Forms!
FormName!SubformName.Filter = "" the filter does not work. Is it because the
subform is actually a control on the main form. Any resolutions?

Thanks,

Steve



Mon, 10 Nov 2003 03:20:22 GMT  
 Setting the Filter property on subform
Steve,

Your analysis is correct.  Use the Form property of the subform control to
give you the reference to the proper object
FormName!SubformName.Form.Filter = ""

HTH,
Kevin

Would anyone know how to set the Filter property on a subform. If I type
Forms!
FormName!SubformName.Filter = "" the filter does not work. Is it because the
subform is actually a control on the main form. Any resolutions?

Thanks,

Steve



Mon, 10 Nov 2003 05:13:06 GMT  
 Setting the Filter property on subform
Try Forms!FormName!SubformName.Form.Filter

you can use expression builder for this

--
Alex.Dybenko.com


Would anyone know how to set the Filter property on a subform. If I type
Forms!
FormName!SubformName.Filter = "" the filter does not work. Is it because the
subform is actually a control on the main form. Any resolutions?

Thanks,

Steve



Mon, 10 Nov 2003 05:07:57 GMT  
 Setting the Filter property on subform
Not 100% sure what you are asking as if you want to filter, you generally
should have something it the Filter String (are you using "" for no
Filter?).

Answers as I guess:

* If I want to filter the Records in the SubForm, I use

    Forms!FormName!SubForm_ControlName.Form.Filter = "some criteria"
    Forms!FormName!SubForm_ControlName.Form.FilterOn = True

Don't need the 2nd statement if it already True. Doesn't hurt either.

* If I want to remove Filtering, I use:

    Forms!FormName!SubForm_ControlName.Form.FilterOn = False

I hope you know the SubForm_ControlName is different from the SubForm's
FormName.

HTH
Van T. Dinh


Would anyone know how to set the Filter property on a subform. If I type
Forms!
FormName!SubformName.Filter = "" the filter does not work. Is it because the
subform is actually a control on the main form. Any resolutions?

Thanks,

Steve



Mon, 10 Nov 2003 10:35:35 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Applying a filter on a form filters subforms, too

2. Setting subform properties from parent

3. Filter property and record sets

4. Cannot set filter property on Recordset.

5. How to set the Filter Property of CommonDialog at runtime

6. Filter Querry on Subform using calender control

7. Form goes to 1st record when filter applied to subform

8. filter subforms

9. applying filter on a subform

10. Subform code for apply filter??

11. How do I apply a filter to a SUBFORM (In VBA CODE)

12. Do I need code for Subform filtering?

 

 
Powered by phpBB® Forum Software