Results 1 to 8 of 8
  1. #1
    smahdih is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    52

    disable editing options

    Dorod (Means hi)



    i want when open an access file all edit options and navigation pane and toolbars are disable. how do it for a special file not every file ?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    In Access2010, click File > Options > Current Database, make choices as desired to not display navigation pane, ribbon, shortcut menus. These are project specific settings. You must hold the shift key down as project opens so you can have these features available. So anyone who is aware that shift key overrides these settings will still be able to get to the design objects. To enforce more stringent restrictions will require advanced measures, such as compiling the project to an mde, setting password accessibility. Measures I have never implemented.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    smahdih is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    52
    so i must implement a form for type user&pass

    i created a table for store user's name and your passwords, and created a form for login. if user's name and your password is correct see a special form else if shows up a message and exit

    how do it?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I did not say you must have username/password but that it could be part of an advanced security setup. A username/password login form alone will not secure the project against the shift key trick.

    Review these threads:
    http://forums.aspfree.com/microsoft-...rd-399061.html
    http://forums.aspfree.com/microsoft-...tc-324677.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    smahdih is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    52
    despite this if i want to implenet username/pass how can i do it?
    what event must be change?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You could set that login form to open on default when the project opens. This is a setting on the Current Database properties panel.

    Then have code in a button Click event that checks the username/password entries for validity.

    Alternately, you can grab the username with VBA.Environ("USERNAME"), compare this to your list of authorized users and if valid, proceed to open working form or return message like "Access not authorized, see Administrator". I have a project that assumes if user logged into the network they are valid users. If it's their first time I will open login form and they enter initials. I create record for their username and initials and they never have to login again. We want initials to document who did what in various processes. It is not a security measure.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    smahdih is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    52
    Quote Originally Posted by June7 View Post
    You could set that login form to open on default when the project opens. This is a setting on the Current Database properties panel.

    Then have code in a button Click event that checks the username/password entries for validity.

    Alternately, you can grab the username with VBA.Environ("USERNAME"), compare this to your list of authorized users and if valid, proceed to open working form or return message like "Access not authorized, see Administrator". I have a project that assumes if user logged into the network they are valid users. If it's their first time I will open login form and they enter initials. I create record for their username and initials and they never have to login again. We want initials to document who did what in various processes. It is not a security measure.
    sorry, i can't do this
    i dont know what type in onclick event buttom to check user/pass

    can you create a sample?

    Good to see

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The code is really simple VBA. One approach would be to use DLookup.

    If DLookup("Username", "tablename", "Username='" & Me.username & "'") And DLookup("Password", "tablename", "Password='" & Me.password & "'") Then
    DoCmd.OpenForm "formname"
    Else
    MsgBox "Invalid Username/Password. Try again or see Administrator"
    End If

    You need to learn elementary VBA. Search the Access Help for topic 'Introduction to Programming in Access'.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Access Options
    By arunsule in forum Programming
    Replies: 2
    Last Post: 08-02-2011, 12:41 PM
  2. access will not allow editing
    By wthoffman in forum Access
    Replies: 3
    Last Post: 12-18-2010, 02:13 PM
  3. Locked for editing
    By Ted C in forum Security
    Replies: 19
    Last Post: 10-12-2010, 08:32 PM
  4. Editing equations with VBA
    By Alexandre Cote in forum Programming
    Replies: 0
    Last Post: 07-15-2010, 11:13 AM
  5. Form for Editing Only
    By Schwagr in forum Forms
    Replies: 4
    Last Post: 03-24-2006, 05:34 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