Solved

Prevent User from switching tabs in a navigation form

Posted on 2014-02-09
6
602 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
Comment Utility
Set each of those form's modal property to Yes.

Ron
0
 

Author Comment

by:Mavislee
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 19

Accepted Solution

by:
MINDSUPERB earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

MS Access 2003 or later To MySQL Migration Project Hello All, this is my second article in the category of MS-OFFICE Automation. In internet I am not able to find any comprehensive resource on the Migration of MS Access back-end to MySQL so I fin…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now