Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2002
    Location
    Los Angeles, CA
    Posts
    6

    Unanswered: How to restrict users from Design View?

    How to you restrict end-users from toggling to design view and only being able to use the forms for accessing/editing records?

    Thanks!

  2. #2
    Join Date
    Sep 2003
    Location
    UK
    Posts
    122
    There are a lot of things you can do. To start with I would goto TOOLS > STARTUP and change a few settings in there - untick all of the boxes and suddenly the users are a lot more limited (they can only do what you let them).

    BUT if any user holds down the shift button and then loads the DB it will open in "safe mode" and ignor the startup.

    You can use the Make MDE which fully compiles the database but the MDE version can NEVER be edited not even by you.

    I understand that they are variouse built in password systems that you can use as well.

    If you have many users you might want to consider "splitting" the database and giving them some limited front ends that they use tto access the DB.
    Matt the Hat says: "what!?"
    A child of five could understand this! Fetch me a child of five!
    SCARY HARD CHALLENGE: http://www.dbforums.com/showthread.php?threadid=988682

  3. #3
    Join Date
    Sep 2003
    Location
    T.O.
    Posts
    326
    I can't emphasize this enough: Only put this in your production database and make sure you have an original copy without this code run against it. You will never be able to get into the database again.

    Dim strMsgTitle As String
    Public Const PROPERTY_NOT_FOUND = 3270 'Property not found

    Function SetProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
    Dim dbs As Database
    Dim prp As Property
    On Error GoTo SetProperty_Err

    Set dbs = CurrentDb

    dbs.Properties(strPropName) = varPropValue
    SetProperty = True

    SetProperty_Exit:
    Exit Function
    SetProperty_Err:
    If Err = PROPERTY_NOT_FOUND Then 'Property not found, therefore create it
    Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)
    dbs.Properties.Append prp
    Resume Next
    Else
    'Unknown error
    SetProperty = False
    Resume SetProperty_Exit
    End If
    End Function

    Function SetStartupProperties()
    'This initializes and sets all the properties in the Tools, Startup... dialog box.
    'It should be executed only in test when preparing the database for production in
    'order to lock down the application.

    DoCmd.Hourglass True
    strMsgTitle = "BAB Input Template Application"

    SetProperty "AppTitle", dbText, "BIT" 'Application Title

    SetProperty "StartupShowDBWindow", dbBoolean, False 'Display Database Window
    SetProperty "StartupShowStatusBar", dbBoolean, True 'Display Status Bar

    SetProperty "AllowFullMenus", dbBoolean, False 'Allow Full Menus
    SetProperty "AllowShortcutMenus", dbBoolean, True 'Allow Default Shortcut Menus
    SetProperty "AllowBuiltinToolbars", dbBoolean, True 'Allow Built-In Toolbars
    SetProperty "AllowToolbarChanges", dbBoolean, True 'Allow Toolbar/Menu Changes

    SetProperty "AllowBreakIntoCode", dbBoolean, False 'Allow Viewing Code After Error
    SetProperty "AllowSpecialKeys", dbBoolean, False 'Use Access Special Keys

    '==> Never execute SetProperty "AllowBypassKey" except when moving from test to production
    ' since it will disable the Shift key for the next time the application is started.
    SetProperty "AllowBypassKey", dbBoolean, False 'Allow Bypass (Shift) key

    DoCmd.Hourglass False
    MsgBox "Start Up Properties have been set.", vbOKOnly + vbExclamation, strMsgTitle
    SetStartupProperties = True
    End Function
    All code ADO/ADOX unless otherwise specified.
    Mike.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •