SubForm does not refresh when resetting Filter to Null

R

RogerManiccia@ebs

I have a form with 2 subforms SubfrmA and SubfrmB where subfrmA and SubfrmB
refer to the name of the subform control on the parent form. . On the main
form the user can select from a series of combo/drop down boxes to filter the
information displayed in the subform. When the user selects an item from the
combo/drop down box, the afterupdate event creates the SQL string to filter
the recordset:

Me.subfrmA.Form.FilterOn = True
Me.SubfrmA.Filter = SqlStr
Me.subfrmB.Form.FilterOn = True
Me.SubfrmB.Filter = SqlStr

This works great. The problem is when the user deselects/removes all the
criteria, hence there is no filter. The following is the code that gets
executed:

Me.subfrmA.Form.FilterOn = False
Me.SubfrmA.Filter = ""
Me.subfrmB.Form.FilterOn = False
Me.SubfrmB.Filter = ""

SubfrmA requeries in the Main form correctly, subfrmB does not refresh in
the Main Form. SubfrmB does not change at all. I have tried the adding one or
more of the following lines:

me.subfrmB.requery
me.subfrmB.form.requery
me.requery
me.subfrmB.form.recordset.requery

As far as know, I am using the exact same method for both. Does anybody have
any ideas. Thank you for your help.

This is the same question entered in the forms discussion topic.
--
Roger Maniccia
emdeon
26 Century Blvd
Nashville, Tenn
615-886-9031
 

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