Asked by:

Access 2010 Navigation Form Programming

Question

I have an application that was written in Access 2007 and almost exclusively in VBA. There are 4 main forms 1. Matters 2. Case Details 3. Document Assembly 4 Time and Billing. I used a 2007 form template with the bar running through the form
header and used that as a navigation bar with the names of the forms as command buttons.

I created a Navigation Module for each of the four forms so that anytime the command button is pressed on any of the forms it calls the public sub for that form and navigates to the form and that form is filtered on the current record of the previous
form.

I give an exam0ple below so if the user is currently in the Matters form and clicks the cmdCaseDetails button it would call the NavCaseDetails public sub and stay filtered on whatever record the user was on.

This works perfectly and I like the UI I created in Access 2007 and BTW loved the features of Access 2007 to re-use forms as templates etc. great for programming and I really liked the flexibility in the UI really outstanding.
Okay enough praise for Access 2007.

Heres the rub I like the Navigation Forms in 2010 even better! My problem is that I don't like macros. All right its not that I don't like them its just that like everyone else that wrtis an applicaiton in access I used VBA because of the
flexibilty. I can find no good source to figure out how to simply program the navigation form tab to open the target, which in Access 2010 Navigation form would now be subform frmCaseDetails and keep the filtered record the user
was last working on in whatever form he was in.

I prefer VBA as a solution because as with the above example I created a module and wrote one code for each form then all I had to do was simply call the public sub for that form on a command button in a form. I have tried to write a macro with a TempVar
but I would have to rewrite it for each button on the various forms.

So how can I migrate my heretofor awesome UI in Access 2007 to the 2010 navigation form and accomplich the same thing.

All replies

Thank you for posting! I have read your post, but I couldn’t figure out what problem you’re going to settle. So, in order to analyze your problem better, could you clarify some points?

1．I
can find no good source to figure out how to simply program the navigation form tab to open the target, which in Access 2010 Navigation form would now be subform frmCaseDetails and keep the filtered record the user was last working on in
whatever form he was in.

Do you mean how to open target Form programmatically? If yes, you can add bind
On Click event with a function on Navigation Button properties, such as
=NavCaseDetails()

2.
So how can I migrate my heretofor awesome UI in Access 2007 to the 2010 navigation form and accomplich the same thing

Could you tell me the details of what the same thing you want in Access2010?

Hopefully, it can do some help to you, feel free to follow up! And I will be happy to be of assistant. Wish a nice day!

Best Regards,

Bruce Song

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

The header in the forms are all identical templates (application parts). I used the template that has a header with a shaded bar running through it. That shaded bar serves as a navigation bar for the 4 forms. Each form has a button (actually
transparent buttons with text and an embeded picture similar to the new 2010 UI for Office 2010)

I any event for a couple of reasons and as you can see from the code I only want one form open at a time and I want the form locked on the record the user was on when he switches forms. I.e. if the user is on the Jones record in frmMatter
and clicks the frmCaseDetails button, as you can see from the code.

frmMatter passes the record criteria to frmCaseDetails

frmMatter then closes and

FrmCaseDetails opens and is filtered on the Jones record.

I want to do the exact same thing with the navigation tabs and navigation forms

In other words the tabs on the navigation forms would open

frmMatter, frmCaseDetails, frmMailMerge, frmTimeBilling

As the target/sub form for that tab and the last record would be filtered on the record the person was last using on the previous form.

Note that if in say a choice of 5 nav buttons, you do NOT have form3 (as in the above example) then the current existing sub form will be replaced. However, if the 4th button is set to form3, then the above would display form 3, and the 4th button would
highlight.

And, as the above shows, you can add in a where clause.

The above browse to command of course is available in both VBA, and macro.

Any idea about what I am doing wrong? It has been a long time since I used Access (early in my IT career), but this doesn't seem too complicated & therefor all the more frustrating that I am probably missing something basic.