I have a subform that is used in two different pages in the parent form. Each page uses different criteria for the subform. Is there a way I can tell, in the subform, which parent page is active? Thanks, Eddie
I have a subform that is used in two different pages in the parent form. Each page uses different criteria for the subform. Is there a way I can tell, in the subform, which parent page is active? Thanks, Eddie
Don't think I've ever used pages in form. Want to provide db for analysis? Follow instructions at bottom of my post.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I wasn't clear with my terminology... Pages are what you get when you insert a Tab Control. Access refers to each tab as a page. I have a Form with several tabs and some of these have subforms in them. In my case, I want to use the same subform in two different tabs/pages, but I want to subform to have different filters depending on the tab/page that's active.
Okay, that's different. I do use tab controls but never had to determine which page has focus. The tab page has a Click event but doesn't seem to do anything when I tested code nor does the tab control Click event. Annoying.
Maybe try the OnEnter event of the subform container control to run code that sets subform filter. Do these subforms have Master/Child linking to main form?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I am going to remove this post because the whole idea is a bad one. If I have the same form loaded as subforms more than once at the same time, the forms interfere with each other. It's like when I try to load it the second time, Access identifies that it's already loaded and just passes control to it... not what I need. Then, when I open the same form as a main form, it is really another instance of the one subform. So, I plan to clone Form1 as subform1 and subform2, then use subform1 as the subform under one tab and use subform2 as the subform under the other tab. The only downside to this is if I change Form1, I have to remember to save it as subform1 and subform2 and change the filters. Thanks for everyone's help. Eddie
Apparently there is a way to open multiple instances of same form - I've never used it. Don't know if it is relevant to your situation. Review http://allenbrowne.com/ser-35.html
Forum doesn't usually remove threads unless they are offensive or spam or some other strong justification. This discussion might actually benefit someone else so think it is worth retaining.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.