Results 1 to 7 of 7
  1. #1
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    828

    Show password chk on a contious form to show that password as selected?

    ShowPassword.zip

    Hi all and good morning,

    I have a problem that is just driving me crazy.
    I have attached db and is just a form, qry, and a few tables, really simple... Sample Data is bogus....
    db opens to form in question.

    I have a form that has shows me the business (Institution) and website
    Along with a continous sub form that shows
    password, username, and login and last changed. Its where i store my online stuff..

    I also has a checkbox to show password with code below.
    The problem is if I tic the showpassword chkbox, it shows (In this case) all the passwords in that form record.
    So if I have two users, it shows both passwords instead of just the one i have the record selector on.

    Code:
     
    'Just one of many samples i have tried.....current one in 
    Private Sub ShowPassword_Click()
      If Me.ShowPassword = True & "OnLineAccessUserID=" & Me.OnlineAccessUserID Then
        Me.Password.InputMask = ""
      Else
        Me.Password.InputMask = "Password"
      End If
      Call Form_Current
    End Sub
    The goal is to check the chkbox and show the password for the current record that is selected.

    I have tried many different methods to overcome this and cannot for any reason figure out how to just show the password to the record selected?
    Just driving me absolutely nuts. Not a major issue with this as my wife and I are the only users but would like to know how to accomplish this task



    I am sure there is a way, i just dont know the path to take.

    Thanks
    Dave

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    I don't think you can alter that property in one instance of a textbox on a continuous form, and conditional formatting doesn't have the ability to modify that property either. You would have to change your form to single view, which shouldn't be a huge problem, no? Actually, anything that results in the form only having one instance of the textbox would suffice, and that could include moving the field to the main form.
    Last edited by Micron; 12-18-2021 at 12:09 PM. Reason: added info
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    What you see is the expected behaviour for continuous forms, changing the formatting of a control will apply to all records. Please review the updated file where I give you two options. One uses conditional formatting and is closer to your desired approach, the other simply calls a msgbox to display the password for the current record.
    Cheers,
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    828
    Thanks everyone,
    I will look these over and see what i come up with.
    Thanks again,
    Dave

  5. #5
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    NEVER use any code that displays the password...even if you fix this so its for the current user.
    Once that is visible on the screen it can be viewed by whoever is nearby.
    It also means that the DB admin can view everyone's password which is a HUGE red flag.
    That could risk you being liable for any issues that arise as a result.

    If you really must store passwords within Access, they should be strongly encrypted using e,g. AES or RC4 encryption.
    Better still, use Active Directory passwords instead of using passwords in Access.
    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!

  6. #6
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Agree, and for one second on my soapbox say again that IMO for most situations, passwords in Access are a waste of time. In the posted solution, double click the field, right click, select copy and paste the password into notepad. Zero security or privacy there, especially if anyone can do this on that form. Unless you absolutely need Access passwords, check Windows login against a table of users. AFAIK, not even a network admin can see your Windows password. If that's incorrect, it doesn't matter as it's way above those who are casual db admins or users.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    I agree with both of you but I according to the OP this is nothing other than a small personal db keeping track of websites and their respective logon ins.

    I have a form that has shows me the business (Institution) and website
    Just driving me absolutely nuts. Not a major issue with this as my wife and I are the only users but would like to know how to accomplish this task
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. Show/Hide txt to password * on a form with a check box
    By d9pierce1 in forum Programming
    Replies: 4
    Last Post: 11-26-2018, 06:26 PM
  2. Replies: 4
    Last Post: 03-28-2017, 03:10 PM
  3. Replies: 1
    Last Post: 06-03-2016, 03:58 AM
  4. Replies: 2
    Last Post: 12-24-2012, 10:15 PM
  5. Replies: 1
    Last Post: 06-22-2012, 08:05 AM

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