Topic: Disable menu bar and tool bar based on user, using VBA
-> Using Access 97 <-
Greetings.
With the help of this forum, I've been able to distinguish a user, and open the appropriate form and then suppress the database access window in our shared application.
Now, I need to turn off the menu bar and the tool bar for some of the users. The problem is, they can get so some pre-built query screens and report generating screens that others can get to as well. So I can't turn off the menu bar or tool bar based on the form.
What I am looking for is a way to turn off the menu bar and the tool bar once the user it identified as being one of the inquiry folks, prior to the first screen opening and staying that way until they exit the application. So, is there a way to do it at the application level?
I tried the [DoCmd.ShowToolbar "menu bar", acToolbarNo] action, and it works on the menu for the first screen, but not after that.
I saw some code from Maquis, which sets some properties, but that requires a close/reopen process that our network will not allow.
I saw some tips about commandbars.visible = false, but that doesn't work for me.
I've seen lots of comments in the forums from people saying they have the toolbars off and want to do something more… how did you do it???
Again, I don't want them to have a menu bar or tool bar at all, and they will share some screens with other folks, so I can't turn off these items at the form-level.
Thanks for your time and thoughts on this!
LJ
-> Using Access 97 <-
Greetings.
With the help of this forum, I've been able to distinguish a user, and open the appropriate form and then suppress the database access window in our shared application.
Now, I need to turn off the menu bar and the tool bar for some of the users. The problem is, they can get so some pre-built query screens and report generating screens that others can get to as well. So I can't turn off the menu bar or tool bar based on the form.
What I am looking for is a way to turn off the menu bar and the tool bar once the user it identified as being one of the inquiry folks, prior to the first screen opening and staying that way until they exit the application. So, is there a way to do it at the application level?
I tried the [DoCmd.ShowToolbar "menu bar", acToolbarNo] action, and it works on the menu for the first screen, but not after that.
I saw some code from Maquis, which sets some properties, but that requires a close/reopen process that our network will not allow.
I saw some tips about commandbars.visible = false, but that doesn't work for me.
I've seen lots of comments in the forums from people saying they have the toolbars off and want to do something more… how did you do it???
Again, I don't want them to have a menu bar or tool bar at all, and they will share some screens with other folks, so I can't turn off these items at the form-level.
Thanks for your time and thoughts on this!
LJ