Why does unlinked sub form lose filter when main form filter is turned off??

J

jgeniti

Hello.
Can someone help me realize what I'm missing here. I have a form that
I added an unlinked subform to. On the main form I have some combo
boxes that I use to filter the main form data. On the sub form I also
have combo box that filters the sub form. For some reason when I call
[Forms]![Products].FilterOn = False it turns the filter off on my
subform. Because I don't have any linked parent or child fields I
don't see any connection.

Any help would be greatly appreciated.
Thank you,
James
 
A

Allen Browne

James, this is an Access bug.

It occurs regardless of whether you have anything in
LinkMasterFields/LinkChildFields or not. Access just gets confused about
whether the filter is on or not.

Microsoft has fixed this bug in Access 2007. However, it remains there in
Access 2, 95, 97, 2000, 2002, and 2003.

More info:
Incorrect filtering of forms and reports
at:
http://allenbrowne.com/bug-02.html
 
J

jgeniti

Thanks Allen.
Is there any type of work around that I could use to avoid this?

James, this is an Access bug.

It occurs regardless of whether you have anything in
LinkMasterFields/LinkChildFields or not. Access just gets confused about
whether the filter is on or not.

Microsoft has fixed this bug in Access 2007. However, it remains there in
Access 2, 95, 97, 2000, 2002, and 2003.

More info:
Incorrect filtering of forms and reports
at:
http://allenbrowne.com/bug-02.html

--
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.



Hello.
Can someone help me realize what I'm missing here. I have a form that
I added an unlinked subform to. On the main form I have some combo
boxes that I use to filter the main form data. On the sub form I also
have combo box that filters the sub form. For some reason when I call
[Forms]![Products].FilterOn = False it turns the filter off on my
subform. Because I don't have any linked parent or child fields I
don't see any connection.
Any help would be greatly appreciated.
Thank you,
James- Hide quoted text -- Show quoted text -
 
A

Allen Browne

Updating to Access 2007? :)

Other than that, the workaround is to avoid applying a Filter to both a main
form and a subform. Set the RecordSource of one of them instead.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

jgeniti said:
Thanks Allen.
Is there any type of work around that I could use to avoid this?

James, this is an Access bug.

It occurs regardless of whether you have anything in
LinkMasterFields/LinkChildFields or not. Access just gets confused about
whether the filter is on or not.

Microsoft has fixed this bug in Access 2007. However, it remains there in
Access 2, 95, 97, 2000, 2002, and 2003.

More info:
Incorrect filtering of forms and reports
at:
http://allenbrowne.com/bug-02.html

message

Hello.
Can someone help me realize what I'm missing here. I have a form that
I added an unlinked subform to. On the main form I have some combo
boxes that I use to filter the main form data. On the sub form I also
have combo box that filters the sub form. For some reason when I call
[Forms]![Products].FilterOn = False it turns the filter off on my
subform. Because I don't have any linked parent or child fields I
don't see any connection.
Any help would be greatly appreciated.
Thank you,
James- Hide quoted text -- Show quoted text -
 
J

jgeniti

Thanks again for the quick response.

For anyone else that might be reading this; another work around that I
found will work (depending on your sitituation) is to avoid using the
"FilterOn = False" statement. Instead of turning the filters off I
just set the filter equal to " [Any field] <> 'ZXZXZX' " and then run
"FilterOn = True". This is a little crude and will still show the
filter as being on but if you can live with it, it might saving you
from having to change a lot of existing code.

For what it's worth, I think Allen's work around is a lot more
technically sound, but this will work if you already have a lot of
code in place.

Thanks.
James



Updating to Access 2007? :)

Other than that, the workaround is to avoid applying a Filter to both a main
form and a subform. Set the RecordSource of one of them instead.

--
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.



Thanks Allen.
Is there any type of work around that I could use to avoid this?
James, this is an Access bug.
It occurs regardless of whether you have anything in
LinkMasterFields/LinkChildFields or not. Access just gets confused about
whether the filter is on or not.
Microsoft has fixed this bug in Access 2007. However, it remains there in
Access 2, 95, 97, 2000, 2002, and 2003.
More info:
Incorrect filtering of forms and reports
at:
http://allenbrowne.com/bug-02.html
message
Hello.
Can someone help me realize what I'm missing here. I have a form that
I added an unlinked subform to. On the main form I have some combo
boxes that I use to filter the main form data. On the sub form I also
have combo box that filters the sub form. For some reason when I call
[Forms]![Products].FilterOn = False it turns the filter off on my
subform. Because I don't have any linked parent or child fields I
don't see any connection.
Any help would be greatly appreciated.
Thank you,
James- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -
 

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