Navigation sub-forms opening in new window (1 Viewer)

JohnF53

Registered User.
Local time
Today, 12:25
Joined
Jul 24, 2013
Messages
10
Hi, I am helping some developing an Access application with a bit of help and advice. We have come across an odd situation.
He had several forms, and then wanted to create a Navigation form. Ok, so far.
When he dragged existing forms to the Nav. form all seemed ok. However when running the Nav. form, some sub-forms open within the Nav. form, but others open in independent windows.
I've looked at all the properties of the the forms and can't see anything that would seem likely to cause this problem.
Any ideas?

Thanks for any help.
 

June7

AWF VIP
Local time
Today, 04:25
Joined
Mar 9, 2014
Messages
5,423
None. I avoid Navigation form - don't like it.

If you want to provide db for analysis, follow instructions at bottom of my post.
 

JohnF53

Registered User.
Local time
Today, 12:25
Joined
Jul 24, 2013
Messages
10
Well, I don't like Navigation forms either, but my colleague wanted to use them. Also, out of academic interest I'd like to understand why the thing I described happens.
 

Micron

AWF VIP
Local time
Today, 08:25
Joined
Oct 20, 2018
Messages
3,476
I've never used them beyond playing around, but this sounds like what you get when you don't activate a page on a tab control before you drop something on to it. You can see it "through" the page and it looks like it's where you want it to be, but in fact it's on the form and you're looking right through the tab control page(s) because that is what was active when you dropped the control. Try activating the tab before dropping the form on it.
 

June7

AWF VIP
Local time
Today, 04:25
Joined
Mar 9, 2014
Messages
5,423
Don't try drag and drop with Navigation form, just type the form name on the 'tab'.
 
Last edited:

PeteB

Registered User.
Local time
Today, 05:25
Joined
Mar 15, 2016
Messages
78
Hi Guys
Thanks for all the input.
I tried deleting one of the forms and typing form name directly into a new tab rather than drag & drop but when form was re-opened in form view it opened in random position.
Macro yp control the form is as below:-
<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<UserInterfaceMacros xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application"><UserInterfaceMacro MinimumClientDesignVersion="14.0.0000.0000"><Statements/><Sub Name="Open Dialog"><Statements><Action Name="OpenForm"><Argument Name="FormName">frmMarSrch</Argument><Argument Name="DataMode">Edit</Argument><Argument Name="WindowMode">Dialog</Argument></Action><ConditionalBlock><If><Condition>Not IsLoaded("frmMarSrch")</Condition><Statements><Action Name="CancelEvent"/></Statements></If></ConditionalBlock></Statements></Sub><Sub Name="Close Dialog"><Statements><Action Name="CloseWindow"><Argument Name="ObjectType">Form</Argument><Argument Name="ObjectName">frmMarSrch</Argument><Argument Name="Save">No</Argument></Action></Statements></Sub><Sub Name="OK"><Statements><Action Name="SetValue"><Argument Name="Item">[Visible]</Argument><Argument Name="Expression">No</Argument></Action></Statements></Sub><Sub Name="Cancel"><Statements><Action Name="CloseWindow"><Argument Name="ObjectType">Form</Argument><Argument Name="ObjectName">frmMarSrch</Argument><Argument Name="Save">No</Argument></Action></Statements></Sub></UserInterfaceMacro></UserInterfaceMacros>
Any further clues to resolve would be much appreciated.
 

JohnF53

Registered User.
Local time
Today, 12:25
Joined
Jul 24, 2013
Messages
10
I've never used them beyond playing around, but this sounds like what you get when you don't activate a page on a tab control before you drop something on to it. You can see it "through" the page and it looks like it's where you want it to be, but in fact it's on the form and you're looking right through the tab control page(s) because that is what was active when you dropped the control. Try activating the tab before dropping the form on it.

I understand what you are saying, as I have fallen foul of that before. I don't think that's the situation with the Navigation forms though, as its more automated than building your own tabbed form and the 'activation' issue will not apply (as I understand it).
 

Micron

AWF VIP
Local time
Today, 08:25
Joined
Oct 20, 2018
Messages
3,476
Well, here's why I came to that conclusion. I opened a nav form where all forms display correctly and dragged & dropped a form from the navigation pane. When I switched to form view, the form I just dropped is on top of every other form exactly where I dropped it.
However, I see that activating the 'page' (not just the tab) before dropping makes no difference. My added form seems to lay over the base of the nav form either way. Typing the name onto the selected navigation button seems to be the way to go.
 
Last edited:

JohnF53

Registered User.
Local time
Today, 12:25
Joined
Jul 24, 2013
Messages
10
Ok, I've found what is causing this problem, in my case at least.

The forms that open in independent windows have OnOpen and OnCLose events with macros assigned. Once I removed those the forms stayed embedded into the Navigation form as expected.

Thanks for the advice, which got me thinking about it from slightly different angles.
 

Users who are viewing this thread

Top Bottom