Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    mrcunknown is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2018
    Posts
    12

    Red face login system


    Hi everyone, I am looking for a login system (with preference 5 roles and an administration where I can see who is logged in and who can add users). I have already searched the internet, but can not find the right one. my knowledge to make it myself is too small. I hope that someone can help me :-)

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    This is a common topic in forum. Many threads with discussion and examples. You just have to do research, make an attempt, and when you encounter specific issue, post question. Here is one for a start that shows my approach https://www.accessforums.net/showthread.php?t=23585
    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
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Here's another from my website http://www.mendipdatasystems.co.uk/p...gin/4594469149
    As June says, there are lots of examples around.
    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!

  4. #4
    mrcunknown is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2018
    Posts
    12
    thank you. As you know, I am very impressed with your login system. only I do not know how to make the form after logging in. but I think your login is super!

    Greets marc

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Did you mean "make the form open after logging in"? Why are you stumped by that? If user passes login validation, open form:

    DoCmd.OpenForm "form name"
    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.

  6. #6
    mrcunknown is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2018
    Posts
    12
    In case of the system for isladogs. Im not sure how the forms should look like aver loggin in.... so every role has his own level. Sorry for my bad English

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Depends on what you want to happen. Do you want to filter records or enable/disable buttons?
    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.

  8. #8
    mrcunknown is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2018
    Posts
    12
    The idea is to enable/disable buttons. After loggin in the user see the buttons he or she have access to like a switchboard

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Options for passing info to the form to open: 1) OpenArgs argument; 2) filter criteria; 3) TempVars or global variable; 4) set textbox value

    Code posted in my link passes value with OpenArgs. I have since modified to apply filter criteria. The Menu form is bound to Users table.

    DoCmd.OpenForm "Menu", acNormal, , "UserInitials='" & Me.tbxUser & "'", , acWindowNormal

    Then code behind Menu form manages itself to enable/disable buttons and perform other actions:

    Code:
    Private Sub Form_Open(Cancel As Integer)
    Me.cbxUser = Me!UserInitials
    If Me!Permissions = "admin" Then
        If Not IsNull(DLookup("DateEnter", "UserComments", "Isnull(DateReview)")) Then DoCmd.OpenTable "UserComments"
        If Format(Now(), "hhmmss") <= "080000" And Weekday(Date) = 2 And ((Month(Date) >= 6 And Month(Date) <= 9) Or Month(Date) <> Month(DLookup("ConstructionExtract", "Updates"))) Then
            ConstructionExtract
        End If
    End If
    If Me!Permissions = "staff" Then
        Me.cbxUser.Visible = False
        Me.btnAdmin.Visible = False
        Me.btnCost.Visible = False
    End If
    If Me!Permissions <> "admin" Then Call SetAccessXCloseButton(False)
    Me.btnSample.SetFocus
    End Sub
    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.

  10. #10
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Quote Originally Posted by mrcunknown View Post
    thank you. As you know, I am very impressed with your login system. only I do not know how to make the form after logging in. but I think your login is super!

    Greets marc
    Oops - sorry Marc - didn't notice your user name when I answered the post!
    If it helps, I'm going to work on my 'Pro version' this week
    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!

  11. #11
    beilstwh is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Jan 2018
    Posts
    11
    Personally I never have internal login systems. I simply grab the windows network login from windows and the privileges are assigned from that user name. Since everyone should have their own network login, let windows handle the authentication.

  12. #12
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Quote Originally Posted by beilstwh View Post
    Personally I never have internal login systems. I simply grab the windows network login from windows and the privileges are assigned from that user name. Since everyone should have their own network login, let windows handle the authentication.
    That's fine in cases where the privileges are consistent in both the network and in each of your apps. However, in all the network apps I have designed, that isn't the case.
    In addition, in many environments, users may need to login to an app on a system where another user is logged in to the network.
    The system you describe cannot handle that scenario
    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!

  13. #13
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    What beilstwh describes is what I do and is reflected in my posted code. Security is not really reason for login. I just need to know who is interacting with the db because some records need to document who is doing the edits. The only time user sees 'login' form is the first time they ever use the db so I can create new record in Users table. I do disable a couple of buttons based on privileges and conditionally run some processes but beyond that, if they have Windows login then they are authorized to use db. The network firewall is far better than anything I could do.
    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.

  14. #14
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,424
    The only time user sees 'login' form is the first time they ever use the db so I can create new record in Users table
    Sounds like you've never made a db that was visible to "outsiders" that shouldn't be allowed in.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  15. #15
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Correct, strictly in-house use.
    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.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 01-20-2019, 04:57 PM
  2. Login System Question in Access
    By Batselot in forum Access
    Replies: 1
    Last Post: 10-05-2018, 08:50 AM
  3. Change password form in login system
    By Luke.F.14 in forum Access
    Replies: 3
    Last Post: 09-08-2017, 07:44 AM
  4. Replies: 1
    Last Post: 02-17-2013, 06:54 AM
  5. Login System
    By anwaar in forum Programming
    Replies: 2
    Last Post: 09-02-2011, 01:31 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