locked
Remembering the last login RRS feed

  • Question

  • How can I setup my login form to remember the last login and password who logged in my database? So the next time they start the application their username and password are already filled out.

    Art Lorenzini IT System Manager Cheyenne River Housing Authority South Dakota

    Friday, April 13, 2018 12:25 AM

Answers

  • Thank you for all the help. After meeting with the users we have decided to fore go this functionality.

    Art Lorenzini IT System Manager Cheyenne River Housing Authority South Dakota

    • Marked as answer by dbalorenzini Monday, April 16, 2018 12:50 PM
    Friday, April 13, 2018 12:48 PM

All replies

  • Create a local user settings table and upon a successful login sure the username.  That said, I wouldn't recommend saving the password as that would imply anyone could login as the last user, thus defeating the entire purpose of having any form of security implemented.

    That all said, I prefer to based my users account of of their window's username, then using very common code, the database can automatically recognize them so they only need to supply a password.  In some cases, since the user already needs to be able to login to windows with proper credentials, there is simply no need for the added security of a password in the database, so the code is sufficient to authenticate the user and completely login to the database.


    Daniel Pineault, 2010-2017 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net


    Friday, April 13, 2018 1:04 AM
  • Hi,

    In advance, sorry if I misunderstand what you want to achieve.

    There would be several ways in order to save username and password that is used last.
    e.g. save it in Registry, in a hidden file, in a table of your database, and so on. Read it and fill it logon form.

    But I'm wondering username and password is necessary for your system, if their username and password is automatically filled when they start the application next time.

    Regards,

    Ashidacchi -- http://hokusosha.com/


    • Edited by Ashidacchi Friday, April 13, 2018 1:11 AM
    Friday, April 13, 2018 1:09 AM
  • It’s a feature they would like to have, but you are right about the password. I think just displaying their user name would be enough and force them to type in the password would be a better way to go. Is there an example of this… I would store the username in a table then when starting up the app, check to see if that is the latest username and push it to the user name textbox.


    Art Lorenzini IT System Manager Cheyenne River Housing Authority South Dakota

    Friday, April 13, 2018 1:36 AM
  • If you want something simple then I would just use the SaveSetting and GetSetting functions, but as others have said I would not store the password.

    It's not very easy to create a really secure Access database unless the code performing the validation is running outside of Microsoft Access.


    Paul ~~~~ Microsoft MVP (Visual Basic)

    Friday, April 13, 2018 3:54 AM
  • See: http://www.devhut.net/2018/04/12/vba-recognize-user-get-username/

    Then just use one of the technique to populate the username control and set the focus on the Password control.


    Daniel Pineault, 2010-2017 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Friday, April 13, 2018 12:44 PM
  • Thank you for all the help. After meeting with the users we have decided to fore go this functionality.

    Art Lorenzini IT System Manager Cheyenne River Housing Authority South Dakota

    • Marked as answer by dbalorenzini Monday, April 16, 2018 12:50 PM
    Friday, April 13, 2018 12:48 PM
  • Hello dbalorenzini,

    Has your original issue been resolved? If it has, I would suggest you mark the helpful reply as answer or provide your solution and mark as answer to close this thread. If not, please feel free to let us know your current issue.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, April 16, 2018 3:51 AM