My Assistant
![]() ![]() |
|
|
Apr 17 2008, 03:49 PM
Post
#1
|
|
|
UtterAccess Addict Posts: 225 From: St. Louis |
Hello,
I have a subform that is filtering out data based upon what is being shown on the main form. I have diagnosed that it is related tothe ChildLinkFields and the MasterLinkFields properties. Is there a way to remove those or say ALL? Scot |
|
|
|
Apr 17 2008, 03:58 PM
Post
#2
|
|
|
Access Wiki and Forums Moderator Posts: 48,113 From: SoCal, USA |
In the design view of the main form, click on the subform container and go to the Properties window. In the Data tab, find the Link Child Fields and Link Master Fields properties and delete them.
In code, you can try: Me.SubformControl.LinkMasterFields = "" Me.SubformControl.LinkChildFields = "" Hope that helps... Edited by: theDBguy on Thu Apr 17 16:59:53 EDT 2008. |
|
|
|
Apr 17 2008, 04:10 PM
Post
#3
|
|
|
UtterAccess Addict Posts: 225 From: St. Louis |
I placed the code:
CODE Me.subSched2.LinkMasterields = "" Me.subSched2.LinkChildFields = "" And I received an error: "Method or Data Member not found." :( Scot |
|
|
|
Apr 17 2008, 04:19 PM
Post
#4
|
|
|
Access Wiki and Forums Moderator Posts: 48,113 From: SoCal, USA |
Did you put the code in the main form's module? Also, make sure subSched2 is the container's name and not the subform's name. Hope that helps...
|
|
|
|
Apr 17 2008, 04:45 PM
Post
#5
|
|
|
UtterAccess Addict Posts: 225 From: St. Louis |
Please forgive my lack of knowledge. I removed the any Links in the child and Master Link properties on the Data tab and I was still getting a filtered subform, eventhough the Links no longer show up when checking those properties.
now, as far as the code is concerned, I don't believe i am following you. The main form is named: frmSched and the sub form is named: subSched2 Yes, I did put the code in the main form's module. Is that not correct? When you say container's name you are referring to the main form, correct? So, what I was doing in the Main Form Load event was: CODE Me.subSched2.LinkMasterFields = "" Me.subSched2.LinkChildFields = "" Is that not correct? I know I am clueless on this one. Sorry about that. Scot |
|
|
|
Apr 17 2008, 05:19 PM
Post
#6
|
|
|
Access Wiki and Forums Moderator Posts: 48,113 From: SoCal, USA |
Deleting the entries in the Data tab still gives you a filtered subform? That's odd. There must be something else we need to check but I'm not sure where to start.
About the code, you need to put it in the main form's module (that's what you did, so you're good). The main form's name is frmSched, the subform's name is subSched2, but the subform container might be different than the subform's name. Do this, while in the design view of the main form, click on the outside border of the subform and check the properties box. Make sure it says "Subform/Subreport" in the title bar and not "Form." If it says Form, try clicking again on the very edge of the subform until you hit it right so it says Subform/Subreport. Once you get Subform/Subreport go to the Other tab and see what is in the "Name" property. That would be the name of the subform control/container. Hope that helps... |
|
|
|
Apr 17 2008, 05:37 PM
Post
#7
|
|
|
UtterAccess Addict Posts: 225 From: St. Louis |
Ok, the subform's 'container' is called subSched2. And I still get the filtered data.
Its driving me bananas. I thought it might be the subform, earlier, so I created a 2nd one , hence the name subSched2. But, it is still performing this way. If I open the subform by itself it displays the correct data. I have also double checked all my queries (used to set the recordsource) and they look good. I can't for the life of me figure this out. I hate it when it behaves like this, because I end up wasting so much time on one issue. Forgive, my agitation, but I am pressed to stabilize this program, and things like this frustrate me endlessly. However, I must say, I am very grateful for all the help I have received in this forum. I have learned so much by utilizing everyones experience. Scot |
|
|
|
Apr 17 2008, 08:17 PM
Post
#8
|
|
|
Access Wiki and Forums Moderator Posts: 48,113 From: SoCal, USA |
Hi Scot,
We're happy to help; however, in this case, it would be hard for us to help you troubleshoot without seeing what you got. I hope you find a solution (and if you do, please let us know so we can help others later). Good luck with your project. |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 25th May 2013 - 11:24 AM |