Solved

Prevent User from switching tabs in a navigation form

Posted on 2014-02-09
6
673 Views
Last Modified: 2014-02-10
I decided to try the navigation form feature in Access 2010. To keep this simple, I created an Add NEW Record form and an Edit EXISTING Record form as well as basic SEARCH form. When the user opens either the Edit Record form or the Add New Record form, I need to keep them there until they've completed the task. I can't seem to figure out how to keep them from moving to another tab, or if they do move, how to trap that event so I can code for it. Does anyone have a technique for doing this?
0
Comment
Question by:Mavislee
  • 3
  • 2
6 Comments
 
LVL 29

Expert Comment

by:IrogSinta
ID: 39845956
Set each of those form's modal property to Yes.

Ron
0
 

Author Comment

by:Mavislee
ID: 39846024
Hi Ron -
That's the first thing I did as that's how I contolled this in previous versions.  It doesn't do anything in this case. Users can switch between tabs very easily. I haven't been using 2010 very long, and there was a long break between when I last used ANY MS access version so I'm going on what I used to do. I figured I'd try the Navigation Forms but it appears to be more trouble than it's worth. It's not intuitive at ALL and it's frustrating to get simple functionality (like this to work). I'm thinking these navigation forms would be the way to go if I'm developing web-based Apps, but I'm not. This is a desktop application. Any opinion on that?
0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 39846307
Sorry, I overlooked the part where you said that you were using the navigation form feature.  My question is why are you using this feature since you aren't developing a web database application?  

Ron
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 19

Accepted Solution

by:
MINDSUPERB earned 500 total points
ID: 39846366
Hello Mavislee,

Navigation button has enabled property under Data tab of the button properties. I may recommend to utilize it.

You may use a sample code below to toggle On/Off the any navigation buttons:

Private Sub NavigationButton14_Click()
Me.NavigationButton18.Enabled = False
End Sub

Sincerely,

Ed
0
 

Author Comment

by:Mavislee
ID: 39847787
Hi Ron, just figured I'd try it for a new, more updated look.like I said I'm new to 2010 and thought I'd try the new feature. I will try Ed's recommendation to see if it works. If it doesn't, I'll go back to the Windows model. I'll update this after I try in case anyone else is pulling their hair out...thanks
0
 

Author Closing Comment

by:Mavislee
ID: 39849045
This worked perfectly! It's exactly what I was looking for.  The code you recommended worked when I used it in the Navigation button's "on click" event, but I decided to put the code in the form's "on dirty" event so I used the following instead.

Forms!frm_navigation!navSearch.Enabled = False
Forms!frm_navigation!navEdit.Enabled = False

Then I re-enabled the tabs when after the user saved or cancelled the transaction. Thanks so much for you help!!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access Report Expression 4 25
VBA Code for Sending Form based on if there is information in the form only 15 34
ORDER BY 7 36
Hide shared folder for some users 2 24
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question