Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 799
  • Last Modified:

Prevent User from switching tabs in a navigation form

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
Mavislee
Asked:
Mavislee
  • 3
  • 2
1 Solution
 
IrogSintaCommented:
Set each of those form's modal property to Yes.

Ron
0
 
MavisleeAuthor Commented:
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
 
IrogSintaCommented:
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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
MINDSUPERBCommented:
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
 
MavisleeAuthor Commented:
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
 
MavisleeAuthor Commented:
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now