Results 1 to 8 of 8
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Temporary password (Access 2000)

    Can you help me build a password that is written in the table “my company information” field PIN and this pasword to be deleted after the command Do.Cmd.Quit, that is to say, one has to write always different passwords.
    I want at first to write the password by opening the form containig this table, and after that, with the help of what is written there pass it to the variable strPassword ?
    As in :
    Dim strPassword As String
    strPassword = InputBox("Please enter the password")
    If strPassword = "pin" Then

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Temporary password (Access 2000)

    I'm sorry, I don't understand what you're trying to accomplish. What's the use of a password that is deleted when the database is closed?

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Temporary password (Access 2000)

    A method my CRM system uses is a UserPreference table, this is linked to a table that holds information about the user (username, email address, department etc). The password for the user is stored in the UserPreference table and has a default setting.

    When the user first logs in you could set some code that creates a msgbox for the new user to reset the password to their choice. You could design it such that they cannot move on into the main database form until it has been done.

    I think it preferable that you do not store passwords in code but rather in a table. My <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>
    Jerry

  4. #4
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Temporary password (Access 2000)

    I agree our idea to change the password every time we visit and check the stock is not so good and we will discard it. But how could we enter the password in the table my company information and then use this as a variable in my function?

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Temporary password (Access 2000)

    Let's say that you store the password in a field named PIN in the table tblCompanyInfo (you should avoid spaces in table names). You can then use DLookUp to retrieve it:

    Dim strPassword As String
    Dim strPIN As String
    strPassword = InputBox("Please enter the password")
    strPIN = DLookUp("PIN", "tblCompanyInfo")
    If strPassword = strPIN Then
    ...

    The user can see the password in the table, of course...

  6. #6
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Temporary password (Access 2000)

    I thought if you defined the txt field as a password, you couldn't see the actual password only the *'s.

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Temporary password (Access 2000)

    Yes, if you set the Input Mask property of the field to Password, the field will display asterisks, but the contents are not encrypted, so it's not hard to get the at the password.

  8. #8
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Temporary password (Access 2000)

    thank you so mcuh for the excellent code

Posting Permissions

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