Reactiviate Full Menus

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

On startup Full Menus is turned off. I want to use a 'backdoor' (not the
shift key) to allow access to the Full Menu. Looking for VB code that will
do this.
Would like to use a sequence of key strokes (e.g., <ctrl> <shft> <7>) to
initiate the code.
 
I would think that the shift key on launching is about the best solution\
for developing here.

Any developers worth their salt is going to distribute a mde anyway.

So, during the day when developing, and I want to test the system in "end
user mode", I will hit alt-f4 (this will exit ms-access).

At this point, you are now back to the folder where you are looking at a
bunch of files, and the mdb file you where in should still be highlighted.
So, I then hit the enter key.

At this point, the application runs, and because of the settings in
tools->startup, no menus appear (you don't need to write one line of code to
hide the menus, all you need is to use is the tools->startup settings. If
you are wring code to hide, or show the menus, then you are doing this all
wrong!).

So, after hitting enter...the applications launches, and runs the main
startup form, runs a lot of setup code (global vars etc get initialized).
You then test the application and make sure it works ok. Ok, now done, we
need to get back to developer mode. You whack alt-f4 to shut down ms-access,
and then again hit the enter key to re-launch the application, but this time
you hold down the shift key.

This whole key sequence of whacking alt-f4 and enter to exit/enter ms-access
and flip between developer mode (hold down shift key), and test in "end user
mode" will happen MANY MANY times in a day during development and testing.
The whole sequence happens in a FLASH, and occurs very quickly once you get
the hang of this.

When you finally got your changes done, then you convert the mdb to mde for
your users, and then disable the shift by-pass key.

So, really, I don't see why you need hide/un-hide the menus via code. The
only reason why you would need this is if you got the development process
all wrong, and are using code to hide all the menus when you don't need to.

If you want to see an application that changes menus for each form, and also
hides all of ms-access, and takes NO CODE to do this, try downloading the
sample database here:

http://www.members.shaw.ca/AlbertKallal/msaccess/DownLoad.htm
(grab the 3rd example...."with ms-access interface hidden"

The only steps left out of the above example for the end users would be to
create the mde, and disable the shift key. However, prior to this last step,
no code is needed to hide/show the menus.

Any reason why you don't just disable the shift key as the LAST step before
you distribute you mde file to the users?
 
thanks for the reply

i understand the concept of enabling/disabling the full menus via Startup
option and using the Shift key to gain access to the menus. The MDE version
has the bypass via shift key option disabled.

However, I have one 'renegade' user in the field (who happens to be at the
director level - pays the bills) who wants to be able to access the full
menus to poke around the tables (i'm trying to convince him that the forms
that we've created should suffice - but he is insisting on being able to have
access to the menus) So my solution is to provide for him a 'backdoor' that
will allow him to access the menus. (don't want to leave the shift key
enabled since this is a known entity).
 
jsccorps,

Piece of cake--just use the GetUserName API that Douglas Steele has posted to capture your director's login name. Using the startup form's OnLoad event, it could be used to remove all the menus and toolbars for everyone else; however, leave them intact if the director opens the application.

========= CODE STARTS HERE ==========

Private Sub Form_Load()

'==================================================
'DATE:
'AUTHOR:
'COMMENTS:
'
'1) Removes all Microsoft Access built-in toolbars.
'==================================================

'Declaring Variables
Dim vUserLogin As String
Dim vDirector As String

'Initialize Variables
vDirector = "YourDirectorLoginName" '<--- Hard-Code Your Director's Login Name Here
vUserLogin = fOSUserName() 'You Need to Create a Module (See Below)

If vUserLogin = vDirector Then
Exit Sub 'Don't Remove Toolbars if Director Logins
Else
'Removes the Built-In Toolbars
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i
End If

End Sub

========= CODE ENDS HERE ==========

NOTE: Make sure you save the the following module with a name different that the function--it won't work otherwise. I suggest you name the module "modfOSUserName" for example. Here's the link to the module you will need to copy and save:

http://www.mvps.org/access/api/api0008.htm

Best regards,

Todd Shillam

thanks for the reply

i understand the concept of enabling/disabling the full menus via Startup
option and using the Shift key to gain access to the menus. The MDE version
has the bypass via shift key option disabled.

However, I have one 'renegade' user in the field (who happens to be at the
director level - pays the bills) who wants to be able to access the full
menus to poke around the tables (i'm trying to convince him that the forms
that we've created should suffice - but he is insisting on being able to have
access to the menus) So my solution is to provide for him a 'backdoor' that
will allow him to access the menus. (don't want to leave the shift key
enabled since this is a known entity).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top