Results 1 to 11 of 11
  1. #1
    Jackal is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2009
    Posts
    1

    Cool Disable/Hide Quick Access Toolbar

    I need to secure an access database, that is control what users can get to (tables etc.). The database will be in 2007, so I cannot use user level control. I tried making the database an MDE, but this failed due to too many Table IDs. I disabled the following: special keys, display navigation pane, allow full menus and allow shortcut menus. Here's the problem, the Quick Access Toolbar still allows users to get into the database settings and thus they can enable all these items again. I cannot find a way to disable that pesky Quick Access Toolbar. I tried code using application.setoption, but I could not find a property to disable this. This is a big hole in security that keeps me from being able to distribute a database with confidence that users can see only what I want them too.

  2. #2
    dpminusa is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Location
    USA
    Posts
    3
    DoCmd.ShowToolbar "Ribbon", acToolbarNo turns off the Ribbon area and the QAT, etc. acToolbarYes turns this back on. You may want to make provision for both with a Keyboard combo or special program that is passworded. I do the latter. If not you may get stuck.

  3. #3
    genesis is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2009
    Posts
    39
    the suggestion of dpminusa is a quick way to get rid of your QAT and also your Ribbon even for your own customized Ribbon. I have also researched myself on how to get rid of QAT but all of them says, it will stay there and together with office button.

    Only way to disable it is to disable its contents only.

  4. #4
    dpminusa is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Location
    USA
    Posts
    3

    Confirming suggestion

    I have tried this on my sites. It seems to work for me.

    I have a mixture of 2003 and 2007 users. I found that conditional compile worked to handle this.

    #cont Is2003 = True
    #If Is2003 Then
    ...
    #End If

    I also found that to secure my system I needed a mixture of:
    DoCmd. statements

    and turning properties off. I am controlling the following properties:

    ChangeProperty "AllowFullMenus", DB_Boolean, False 'Access Full Menus.
    ChangeProperty "AllowSpecialKeys", DB_Boolean, False 'F11, ALT F11, etc.
    ChangeProperty "AllowBypassKey", DB_Boolean, False 'Shift Key Override on loading.
    ChangeProperty "AllowShortcutMenus", DB_Boolean, False 'Access Shortcut Menus. May be too severe.
    ChangeProperty "AllowBuiltInToolbars", DB_Boolean, False 'Toolbars.
    ChangeProperty "AllowToolbarChanges", DB_Boolean, False 'Prevent Changes.
    ChangeProperty "AllowBreakIntoCode", DB_Boolean, False 'Code access.

    ChangeProperty is the Sub that Microsoft has in the Access 2007 Help.

    Remember that some of these require a Database Close and Reopen to be activated.

    There may be some redundancy here, but I am not inclined to worry about it, since it is working as I want it. The system seems locked down in both systems.

    There may be some savants that can get in but my sites are probably of no interest to them. I am worried about marauding users.

    Hope this helps. It took a while to sleuth out.

    dpminusa

  5. #5
    genesis is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2009
    Posts
    39
    that are some ways of securing the database. but I thought your question is about QAT.

  6. #6
    dpminusa is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Location
    USA
    Posts
    3
    Just finishing the thought and clarifying the usage. Without the QAT hiding it is a simple matter to add items to the QAT and export data and other malicious things.

    If the concern is about a finer grained Forum Topic parsing, then I guess this is not what my goal was.

    They seem related to me but maybe this is against your rules.

    The original post does Hide the QAT along with the Ribbon.

    DoCmd.ShowToolbar "Ribbon", acToolbarNo 'Ribbon and QAT are both hidden.

  7. #7
    Helen's Avatar
    Helen is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2009
    Location
    The Hill, Australia
    Posts
    28
    The ChangeProperty function was a HUGE relief to find, combined with RibbonCreator software!!!

    I was converting to ACCDE versions to prevent access to code, but with forms set to retain filtering/sorting (FilterByOnLoad = Yes, SortByOnLoad = Yes), were NOT retained in the ACCDE version, which is really inconvenient for users. I have over 5000 entries in the main database, and any can be set to be ignored (checkbox) if the user isn't interested in them, so they'll want to filter on Ignore = NotSelected.

    ChangeProperty combined with a custom Ribbon to eliminate access to all tabs except Home, and eliminate the View group there too - bingo, no access to code, tables.... my work is safe.

    I still need to be able to get to the code if glitches need fixing, so I put in a "this is me" if/then/else bit at two places.

    One - looks up my CPU serial number.
    If it's MySerial, then
    MsgBox asking "FINAL VERSION?" If YES, then they're all set to false, else set to true
    else they're set to false.

    Second place is when the user is required to enter a username.
    If it's MyUsername, then - all set to true; else set to false. This is just in case my "Final version" actually turned out not to be - yeah, it happens.....
    but..... spare copies, in case of stupidity anyway.

    It took me a while to find the ChangeProperty function given in the 2007 help - here it is, copy/paste - works a TREAT!


    Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer

    Dim dbs As Object, prp As Variant
    Const conPropNotFoundError = 3270
    Set dbs = CurrentDb
    On Error GoTo Change_Err

    dbs.Properties(strPropName) = varPropValue
    ChangeProperty = True

    Change_Bye:
    Exit Function

    Change_Err:
    If Err = conPropNotFoundError Then ' Property not found.
    Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)
    dbs.Properties.Append prp
    Resume Next

    Else
    ' Unknown error.
    ChangeProperty = False
    Resume Change_Bye

    End If

    End Function
    Last edited by Helen; 07-01-2010 at 10:31 PM.

  8. #8
    brettpeirce is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2011
    Posts
    1

    Been a while since this was started... but I have a thought

    It's been a while since this was started or even lasts replied to, but I wonder - what is to prevent a user from not trusting the database/location?

    I am assuming these are lines of code or macros that need to be executed each time the DB is opened. ::EDIT:: (in the AutoExec Macro) ::END EDIT::

    Unless I miss my guess, not trusting the DB would prevent code from running, thus not executing the code that hides buttons, disables access keys, etc. If the toolbars are not hidden, then you are back where you started: someone can change the current database options, save and reopen, still not trusting the DB, then navigate around to everything (except for code and design view if its accde)

    Please tell me if I am partially or completely wrong, missing something or making one or more false assumptions, because I would also be interested in securing my database "console." I have gotten to the point of hiding everything I can, having only the Home Ribbon visible, making an accde to lock code, and hoping that someone does not see or know how to hack in via the "Customize [QAT]" option.

    I have a form that appears by default, and explains how to trust the DB. Once the DB is trusted (or if it is already when the DB is opened), code executes that hides that form and the "console" portion is opened.

    In the end, I figured that if someone knew how to open access in another view and change trust, then they would know how (or be able to figure out how) to hack via the QAT as well. I decided that the home ribbon is occasionally useful during entry and didn't feel that I would significantly increase security by getting rid of it.

    Sorry - I'm usually quite wordy - any thoughts?
    Last edited by brettpeirce; 04-19-2011 at 01:02 PM. Reason: specified AutoExec for running code

  9. #9
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    For me, I use the PopUp = Yes and Modal = Yes for all my forms. This allows me to completely control the flow of how users work with my db. When a form is set to modal and popup, users cannot click on anything but a field/button on the opened form. So if they try to click on any MSAccess 2007 (or 2003) menu item (or even another form that might be open in the background), they cannot (because the form is a modal). Using this technique on all my forms, I thus control the flow of the entire db and exactly what can/cannot be accessed.

    To see how this works, select any of my examples in the code repository. Almost all my examples have this.

    For MSAccess 2007 and the ribbon, I will use the code posted above to remove the ribbon. This combined with the modal = yes/popup = yes works very well.

    Note: I also make an mde/accde for all my frontends. This prevents users from seeing any code should an error happen. The only way a user can get behind the scenes to the actual tables is to use the shift key while opening the frontend (which I don't disable because rarely do users know about the shift key feature and it's a pain to re-enable it to make a simple code change and then disable it again.) Even if a user does use the shift key while opening the db, if they were to make any changes to the tables directly, I can easily find this out since I store the user's LoginID/datetime in several tables (along with other fields updated in code) which would tell me right away that a user is bypassing the interface. I have only had 1 or 2 users do this in the past 30 years. I'm a firm believer that if the interface is designed in an easy-to-use way, users are not likely to try and bypass the interface. I also use a nice technique found here: https://www.accessforums.net/code-re...mple-7571.html
    where I simply create a new query which then let's users view/export the data they need to (I seldom create reports anymore since using this simple technique.) I found this technique works extremely well for users since they can then export any data and then use that data in excel/spss/sas for further analysis.

  10. #10
    jocerio is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    1
    Where do you call this? I made a sub that runs the DoCmds you listed and put in the "On Load" property of the default form that loads when you open the database and that doesn't work.

  11. #11
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    Quote Originally Posted by jocerio View Post
    Where do you call this? I made a sub that runs the DoCmds you listed and put in the "On Load" property of the default form that loads when you open the database and that doesn't work.
    I'm not sure what you mean by 'where to call this'. The PopUp and Modal are properties of the form which you'd set to yes or no. There is also a property under options (for the database) where you can turn the ribbon off/on (for MSAccess 2010).

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

Similar Threads

  1. Replies: 15
    Last Post: 04-11-2015, 08:15 AM
  2. Access 2007 - Hide Ribbons
    By FPeteE in forum Access
    Replies: 1
    Last Post: 11-17-2009, 03:55 PM
  3. Access 2007 menu bar, toolbar...
    By truthseeker170 in forum Security
    Replies: 1
    Last Post: 07-15-2009, 01:45 PM
  4. Quick way to stuff field names into text field
    By kfinpgh in forum Programming
    Replies: 0
    Last Post: 01-04-2007, 01:13 PM
  5. Visual Basic ToolBar and ImageList
    By Athanasopolous in forum Programming
    Replies: 0
    Last Post: 01-17-2006, 03:45 PM

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