Solved

Prevent User from switching tabs in a navigation form

Posted on 2014-02-09
6
657 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

860 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