Setting OrderBy for a parent form overrides Filter property of its child

  • Thread starter Thread starter Mota
  • Start date Start date
M

Mota

Hi;
I have a form with 2 sub forms.One of the subs is not linked to the parent
form and have a filter.Now,i want to use an OrderBy property for the
parent,and where ever i put this property (and its OrderByOn too),it
overrides the filter of the sub and sub shows first records of its
table,regardless of its filter.I put Sub's filter in property sheet,in Load
Event and so on,but makes no difference.Where to put this 2 properties for
the Parent form and its sub to not to overlap.
Thank you so much in advance.
 
Yes. I am able to reproduce your bug, even in Access 2003.

It looks like a variation on a known bug. If you set the Filter property of
both a form and a subform, and then remove *one* of the filters (either
one), Access fails to recognise that the Filter is still on on the other
(i.e. it falsely reports that FilterOn is now False for that one also).
Guess it's not really surprising that the OrderBy property also displays
this confusion.

As a workaround, would it be appropriate to set the RecordSource of your
subform instead of applying a filter? (That's assuming that the normal
process of using the LinkMasterFields/LinkChildFields is not suitable.)
 
Thank you;
Yes,using a SQL statement (Or a Query) as its recordSource surly solves this
problem,but i thought its not recommended if i could use simply a table.And
if there is no way else,i have no way to do this.
But ,the more surprising thing is that this bug still exists in Access
2003-as u mentioned.If this is a known bug,Im wondering of hearing that for
ACC 2003.You ,as a MVP,may report this to Microsoft,and may be in the next
version, they pay more attention to such a small bugs.
Any way,Thank you for ur help.
 
Back
Top