PC Review


Reply
Thread Tools Rate Thread

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

 
 
Mota
Guest
Posts: n/a
 
      5th Dec 2003
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.


 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      5th Dec 2003
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.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Mota" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.



 
Reply With Quote
 
 
 
 
Mota
Guest
Posts: n/a
 
      5th Dec 2003
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.

"Allen Browne" <(E-Mail Removed)> wrote in message
news:3fd06680$0$1757$(E-Mail Removed)...
> 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.)
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Mota" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
passing data child parent parent child Maarten Microsoft C# .NET 3 21st Nov 2005 05:13 PM
Child Form setting Parent Form Property =?Utf-8?B?am1obWFpbmU=?= Microsoft Dot NET Framework Forms 7 11th Aug 2005 10:28 AM
is there an event that fires when a child control is added to a parent container control (ie child panel added to a parent panel)? notu Microsoft Dot NET Compact Framework 1 19th Jul 2005 07:34 PM
Parent/Child Components: How to make the child components go away when deleting the Parent. Patrick Vanden Driessche Microsoft VB .NET 5 14th Nov 2003 11:32 PM
OrderBy (form) and ORDERBY (sql) Gurtz Microsoft Access Form Coding 4 17th Aug 2003 06:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:14 PM.