Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to disable F12 key so nobody can export any of my forms 1

Status
Not open for further replies.

natatbh

Programmer
Dec 18, 2002
81
US
I would like to disable the F12 key so that nobody can export any of my forms to another database. I already disabled the allowbypass of the shift key. I also disabled the F11 key so that nobody can open the database window. In order to further secure my DB I want to disable the F12 key. any idea?? please help.

A beforehand thanks to any helpers.

Nathan
 
To prevent people from getting to your database, you need to implement security (via the Security Wizard)
 
You didn't really answer my question fancyprairie did you?
 
The easiest way (although it can also be circumvented if the person is aware enough to know about the F12 key anyway) is to put F11 and F12 in an AUTOKEYS macro and have them do nothing....

The Autokeys macro NORMALLY runs when yonder database is opened, but if the user holds the SHIFT key down whilst opening, then it gets bypassed just like all the other startup stuff.

There's also the "Disable special Access keys" option, but it's not all the difficult to go in and turn it back on, if you're a user with a larcenous heart.

The only relatively surefire way, short of using Access Security, is to Front End/Back End your database, and turn the Front end (where the forms are) into an MDE file.

Jim


Me? Ambivalent? Well, yes and no....
Another free Access forum:
More Access stuff at
 
Hi WildHare,
Thanks for giving me your advice.

I tried to use the "Disable special Access keys" option but it doesn't seem to work.
Also, if you can give me some specifics on using an AUTOKEYS macro I would really appreciate it.

Thanks

p.s. I was kind of awed by your profile there.

 
It appears that what you are trying to do is to prevent people from copying your forms, etc. By disabling the F12 keys, etc. will not do that for you. All the users have to do is to open a new database and import your forms, etc. into their database. That's why I said that if you want to prevent users from messing with your database or copying (stealing) stuff from your database, you will need to secure your database. Securing a database can be done in about 5 minutes. If this is what you want to do, don't attempt it until you get back with me.
 
Hi FancyPrairie,
Thanks for your advice, straight and to the point.

I see what you're telling me. I'd really appreciate if you can get back to me so that we can further discuss how to secure a database.

Thanks.

 
I may have exagerated about taking 5 minutes. That's about what it takes me. But I've done it several times and know what's going on. So I fill comfortable going thru the steps below. Since this is your first time, it may take you a little longer. Securing a database can be quite complicated to understand. However, if you follow the steps outlined below, it shouldn't be a problem.

You will want to secure both your front-end and back-end databases (if you have split your database). Be sure to back everything up (including the System.mdw file) before attempting this. That way, if something gets messed up, you can try again.

The System.mdw file is the default workgroup file that ships with Access. User Admin is the default user and is a member of the Group "Admins". Anyone assigned to group Admins has rights to everything. Therefore, the following steps will create a new workgroup file, remove user Admin from the Admins group and assign you to the Admins group. You will become the owner of everything in your database.

Here's the steps involved in creating a workgroup file for the front-end database. You will need to follow the same steps for the back-end database.


1. Backup your System.mdw file in case you mess up (this is the one that ships with Microsoft). Also backup your databases.
2. Open your database
3. Add a new user (i.e. MyAdminsUser or your name) Make sure this new user is a member of the group "Admins" (This user represents the Administrator of the project and, as such, will have all rights to the database)
4. Assign a password to user Admin (User Admin is the default user for unsecured databases)
(By assigning a password for Admin, you will be forced to login to Access everytime you open a database. Don't worry about it, will take care of that later.)
5. Exit Access
6. Restart you database (Access will ask you to login. Login as the new user (MyAdminsUser or your name - no password)
7. Start the Security Wizard (Tools|Security)
8. In the first screen check the box entitled "Create a new workgroup information file"
9. Select Next
10. In the second screen, select Browse (located to the right of the file name field). At this point you will name your workgroup file (I would suggest putting your new workgroup file in a location that everyone will access (i.e. a network server))
11. Select the check box entitled "I want to create a shortcut to open my secured database"
12. Select Next
13. On the third screen, simply select Next (You'll want to secure all existing database objects)
14. On the fourth screen, simply select next (Don't select any groups to be included in your workgroup information file)
15. On the fifth screen, select the check box entitled "No, the Users group should not have any permissions"
16. Select Next
17. The sixth screen asks you to list the names of users you want added to this workgroup. The only one you want included is the new user you created earlier (MyAdminsUser or your name). Add the new user to the list. By default, your network name is shown, remove it. The new user should be the only one in the list.
18. Select Next
19. On the seventh screen, select the check box entitled "Select a user and assign the user to groups". The field entitled "Group or User Name" should contain the name of the new user you created earlier. And the Group Admins must be checked.
20. Select Next
21. Select Finish

You now have a secured workgroup. Now, launch your database (via the shortcut just created) and login in using the new user's name and create your groups and users and assign rights to them via the Security tool.
You'll need to do the above steps for your back-end database also.

Note if you don't use the shortcut to launch your database, if won't run because you have security on it now. To see what's going on, RIGHT click on the shortcut and select properties from the menu. In the Properties window, select the tab entitled "ShortCut". Then click inside the field labeled "Target". There you will see how Access launches your database using the Workgroup file you just created. It will look something like this:
path\msaccess.exe path\YourDatbasename.mdb /wrkgrp path\YourWorkgroupName.mdw

I usually don't assign rights to any of the users. Rather I assign rights to the Groups I created. I then assign users to the groups.

When you are done, you will want to remove the password for user Admin in the System.mdw file. So, launch access and open an unsecured database, it will ask you to enter your name and password. Enter "Admin" and the password you assigned to Admin in step 4 above. Once you are into the database, remove the password for user Admin.

Gook luck! If you have any problems, let me know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top