Link to home
Start Free TrialLog in
Avatar of Fritz Paul
Fritz PaulFlag for South Africa

asked on

Control actions on Navigation Form's Navigation Button.

I am using a Navigation Form in access 2010 for a property management application. I want to have different controls for "Add Property" and "Edit Property", but I only want to design and use one detail form. Each control seems to have one unique detail form attached to it. Say I attach the same detail form to both buttons, how do I control that in one case the form opens in add mode and in the other case in edit mode.User generated image
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

I don't think you can do that, using the Navigation Buttons. From what I've been able to tell, those buttons just open a Form, and nothing else. You'd have to have two different forms, and that could be troublesome from a maintenance standpoint.
I don't use the navigation form.  It is too limiting in a large application so I just create my own tabbed forms if I want that style.  I also never open main forms directly to a record.  I always create my applications to work in a client/server environment since I either know from the beginning the BE will be upsized to a server based database engine or that perhaps some time in the future the need will arise and I don't want to have to rework all the forms to be good client/server citizens and the navigation form just doesn't fit the bill.  It is designed to help novices who can't build their own tabbed form or to replace the switchboard which everyone pans but which I use in almost every app.  It's not slick but you can make it look better than it did in the past by adjusting the properties of the buttons and labels and you might actually like it:)

If you have a way of identifying which button was pressed, you can use that in the Activate event to move to a new record when the "add" button is pressed.  I'm just guessing that the Activate event would be appropriate.  I don't know if that event fires for subforms when they get the focus.  If the Activate event doesn't fire, you might try the Current event but don't forget to check first if you are on a new record or you'll put the app into a never ending loop.
ASKER CERTIFIED SOLUTION
Avatar of IrogSinta
IrogSinta
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Fritz Paul

ASKER

I like and appreciate Pat's reply a lot. However Ron is answering the question and I appreciate the link that he advised and the video which he pointed out.
I learnt about the use of the Navigation control and that the navigation form will not open in versions before A2010 (at the end of the video).
Thanks,
Fritz
One other problem I found with the navigation form (and actually the reason I don't use it) is that it is limited to 5*5 items.  I frequently have apps with lots more menu selections.  One current app uses 56 items across 6 "switchboard" forms.  BTW, I increased my switchboard from 8 to 12 items and may go to 16.  It is just one line of code that needs changing, plus of course, you need to add the additional controls.  My switchboard is left over from A2003 since that was the last one that used VBA.

I agree that loading subforms as needed rather than all at once is more efficient but you can do that yourself if necessary with a tabbed form.
PS - the file paths at the top show only for me.  The users don't see them.
User generated imageUser generated image