Solved Show Password on Continuous Form (1 Viewer)

mloucel

Member
Local time
Today, 05:07
Joined
Aug 5, 2020
Messages
153
Hello All..

I have a Form called frmLoginUpdate which is linked to my tblLogin, is a Continuous Forms, displays the LoginID, UserName, Password(hidden) AccessLevel and OfficeLocation, Active,
then the Field [SPwd] (On the form is called ShowPassword, but the Control Source is SPwd [field on the table])
a check where if NOT checked then the password is hidden and when the user CLICK or enable the check, Displays the Password ( SEE ATTACHMENT PIC),

My Issue is that when I click the check mark ALL passwords are displayed (UNMASKED) not just the one that it is located in that line, I don't know how to modify the code so that it ONLY unmask the line I'm in and not all of them.

Here is my code:

Code:
Private Sub ShowPassword_Click()
    'ShowPassword is the Name of the check box
    'Check Box Control Source is SPwd from the Table
    'SP is the LABEL Name
    
     If ShowPassword = True Then
       Password.InputMask = ""
       SP.Caption = "Hide Password"
    Else
       Password.InputMask = "Password"
       SP.Caption = "Show Password"
    End If

End Sub


Thanks for any help you can provide.
 

Attachments

  • LOGIN FORM.jpg
    LOGIN FORM.jpg
    71.1 KB · Views: 60

theDBguy

I’m here to help
Staff member
Local time
Today, 05:07
Joined
Oct 29, 2018
Messages
21,473
To do something like this, you may have to display a calculated column that either shows the password or the mask depending on the checkbox, which also must be bound to a field in your table to only affect the corresponding row.
 

mloucel

Member
Local time
Today, 05:07
Joined
Aug 5, 2020
Messages
153
To do something like this, you may have to display a calculated column that either shows the password or the mask depending on the checkbox, which also must be bound to a field in your table to only affect the corresponding row.
I'm Guessing calculated field meaning the field on the table? which is already bound by the field SPwd a True/False field ?
Or I am not understanding your answer..
But the field on the form ShowPassword is Bound already to the table to SPwd.
 

June7

AWF VIP
Local time
Today, 04:07
Joined
Mar 9, 2014
Messages
5,472
Can use Conditional Formatting to set background color and font color to hide/display password based on SPwd for each record individually all at same time. However, this will not act on just the current record. All records where SPwd is True will display password and those where False will not. If you want to reveal only the current record password that is difficult. If form is designed to show only one record when navigating, the result will appear as if only current record is showing password.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:07
Joined
Oct 29, 2018
Messages
21,473
I'm Guessing calculated field meaning the field on the table? which is already bound by the field SPwd a True/False field ?
Or I am not understanding your answer..
But the field on the form ShowPassword is Bound already to the table to SPwd.
I used the term "calculated column," because I wanted to make sure it didn't sound like I was talking about a calculated "field." What I meant was a calculated column in a query to display either a mask or the password. Hope that clarifies it a bit.
 

KitaYama

Well-known member
Local time
Today, 21:07
Joined
Jan 6, 2022
Messages
1,541
I won't save raw passwords for users. They should be encrypted.

Check the attached database.
 

Attachments

  • Database5.accdb
    440 KB · Views: 95

mloucel

Member
Local time
Today, 05:07
Joined
Aug 5, 2020
Messages
153
Can use Conditional Formatting to set background color and font color to hide/display password based on SPwd for each record individually all at same time. However, this will not act on just the current record. All records where SPwd is True will display password and those where False will not. If you want to reveal only the current record password that is difficult. If form is designed to show only one record when navigating, the result will appear as if only current record is showing password.
Thanks but, I know there's gotta be a way..
 

mloucel

Member
Local time
Today, 05:07
Joined
Aug 5, 2020
Messages
153
I won't save raw passwords for users. They should be encrypted.

Check the attached database.
Yes!!!, I see your Idea, I was thinking in using the ID as well, I just didn't know how to implement the Idea I was missing your example, by playing with the ID and the hidden password box to show the password. the password in my Data is hidden by default (input mask ) but I tested already with the input mask and it works really well as is, that is as far as I will go with this one.

Thank you so much.

ALSO: I understand the fact that those passwords should be encrypted, but I do not have enough knowledge to do that, but eventually I will get there, in the meantime, I am learning step by step.
 
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Today, 05:07
Joined
Oct 29, 2018
Messages
21,473
@KitaYama gave me a great suggestion, I think is between what you suggested and what I was thinking, it works like a charm.
Thank you so much @theDBguy your advice is greatly appreciated.

Maurice.
Ah, okay. Glad to hear you got it sorted out. Good luck with your project.
 

mloucel

Member
Local time
Today, 05:07
Joined
Aug 5, 2020
Messages
153
Ah, okay. Glad to hear you got it sorted out. Good luck with your project.
Thank you, I'm 60 and I come from FoxBase 20 years ago or more, I never tried programming again, until now that I either learn to survive my Job, doing something nobody knows or they kick my butt.

You guys are masters, thank you so much, again.

Maurice.
 

Users who are viewing this thread

Top Bottom