Results 1 to 15 of 15
  1. #1
    Zetheroth is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Jun 2022
    Posts
    31

    trying to lock people out of using anything but the main menu and its links


    This database has been made so that someone with little to know access knowledge could use it hopefully, but I don't want them to be able to change anything because they have been known to break these in the past. so my goal is to lock them out of being able to manually chance what they are on and only able to use the premade buttons to navigateSales Examples.zip

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549

    Lockout

    I use this Lockout app. run it in the same folder as your db,
    select db from list,
    Lock.

    then users cannot use the shift-bypass, nor get to the tables or code.
    Attached Files Attached Files

  3. #3
    Zetheroth is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Jun 2022
    Posts
    31
    I'm getting a 3386: Property 'Name' must be set before using this method

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    some db's it gives funky errors, but still locks the db. Is this true?

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,128
    You should do a number of things including hiding the navigation pane & ribbon, disable shift bypass, save as ACCDE etc
    This will significantly improve security though no Access database can ever be 100% secure

    Have a look at my article Securing Your Database - A Tutorial. It includes an example app you can use for testing the different methods
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,128
    @Ranman256
    For info, I just tried your app in 32-bit Access 365 & got a whole series of errors.
    On opening, I get this error:

    Click image for larger version. 

Name:	Capture.PNG 
Views:	35 
Size:	21.7 KB 
ID:	49094

    That's an error related to use of your custom ribbon in a different version

    I first tried it by adding the OPs database to the dropdown's empty value list and clicked Lock Database which triggered this error repeatedly.

    Click image for larger version. 

Name:	Capture1.PNG 
Views:	34 
Size:	18.2 KB 
ID:	49095

    After it appeared 8 times, your app closed without warning.
    There was no effect on the selected database

    Instead of manually adding items to a value list, having a browse button to select the database would, in my opinion, make it easier for end users

    I then placed it in the same folder as you stated and also got error 3386
    At this point I gave up. I didn't examine your code other than to report that it didn't compile - extra End If in cmdUnlockDatabase_Click
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  7. #7
    Zetheroth is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Jun 2022
    Posts
    31
    so... I cant have them use runtime because the users will be on the same computer that I use, I need a way to password lock the functions instead where I can give a password to unlock it, also if needed I have a final version of the document I'm trying to lock them out of. Ideally they only have access to forms, and the forms they have access to are based of the main menu form that it starts on, they also need to see the reports in print mode, but the system has a way to call them they don't need to do it themselves

  8. #8
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    I cant have them use runtime because the users will be on the same computer that I use
    it's a fairly weak security measure, although it does add another level, but renaming your file as .accdr simulates a runtime environment. It's weak because users with a bit of knowledge can change it back again.

    Ideally they only have access to forms
    not sure if it is covered by Colin's link but don't forget to disable right click menus or replace them with your own. Right clicking on the form window bar for example gives you this
    Click image for larger version. 

Name:	image_2022-11-16_223308673.png 
Views:	27 
Size:	26.9 KB 
ID:	49130

    Not a problem with runtime since that disables right click menus - and if your users use a .accde they won't be able to get into design view anyway

    If your users are using your computer - are they logging in themselves? or using your login? If the former you can keep a development copy (.accdb) in your documents folder or similar (C:\users\your username) that only you can see, and put the production copy in a folder that is shared by everyone

  9. #9
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,128
    Yes, I do mention disabling right click context menus in my article

    BTW the screenshot above must be from A2010.
    I believe the two Pivot items no longer appear as they were deprecated in A2013. Not sure what Menu Details is - a custom item?
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  10. #10
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    Correct 2010. Menu details is a temporary option I added. Clicking it tells you all about the selected shortcut- properties and controls. It is dropped when the app is closed

  11. #11
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,128
    Quote Originally Posted by CJ_London View Post
    Correct 2010. Menu details is a temporary option I added. Clicking it tells you all about the selected shortcut- properties and controls. It is dropped when the app is closed
    That's an interesting idea.
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  12. #12
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    Can show you tomorrow!

  13. #13
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,128
    Quote Originally Posted by CJ_London View Post
    Can show you tomorrow!
    I know - that was my way of encouraging you to do so!
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  14. #14
    Zetheroth is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Jun 2022
    Posts
    31
    Thanks everyone! got the doc from @Ranman256 working, for some reason while access is open I get like a shadow of the document that stays a while after closing. Once that fake copy vanishes I can lock and unlock, there was an extra "end if" in the code, but i cleaned it out. Onto another issue on another post!

  15. #15
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    --------------------------

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Main Menu Buttons
    By PATRICKPBME in forum Access
    Replies: 2
    Last Post: 01-20-2017, 03:30 PM
  2. Main menu
    By BSJoJaMAx4 in forum Access
    Replies: 13
    Last Post: 08-29-2015, 07:36 PM
  3. Main menu page
    By DianneBeck in forum Misc
    Replies: 3
    Last Post: 06-02-2015, 07:00 PM
  4. Main Menu
    By MarkV in forum Access
    Replies: 3
    Last Post: 12-07-2014, 09:57 PM
  5. Main Menu and Sub Menus
    By REngelbr in forum Access
    Replies: 0
    Last Post: 08-25-2009, 03:51 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums