Navigation Form - opening same form problem

Kanga

New member
Local time
Today, 11:49
Joined
Oct 14, 2011
Messages
9
Access 2010 newbie.

I’ve set up a horizontal tab, 2 levels navigation form and under one of the main tabs l’ve created two tabs as pic1.
When a user clicks either of the buttons they are taken to the same form but l would like the create button to open the form with a new empty record and if they click the Edit button then the form opens showing all records.
Normally on a normal button the OnClick would contain DoCmd.GoToRecord , , acNewRec but l’m struggling to find where to place this in the new Navigation Form.

Any help would be most appreciated.
Kanga
 

Attachments

  • pic1.jpg
    pic1.jpg
    38.2 KB · Views: 147
Thanks for that JHB. However if you put your code into the OnClick of the navigation button; it opens the form as a separate form and not within the Navigation Form.
 
Oh - I miss it should be in the navigation form.
 
I had a similar problem. I believe that the appropriate DoCmd is BrowseTo, rather than OpenForm. This seems to work directly on the Navigation Form and its associated buttons.

One caveat - if you are doing any manipulation of the controls on the target form before browsing to it, you will open a separate instance of the form (which is the problem I had ;-)

You are aware that Navigation Forms are primed to open the target form from scratch. If you want to maintain state between two appearances of a form, you have to manage that yourself (and it's a pain!)

Tony
 

Users who are viewing this thread

Back
Top Bottom