Talismanic
02-02-2001, 07:00 AM
Is there a Format As Password for Input boxes that will hide the contents being entered. Here is what I have but I can't figure out a way to put the password mask on top of it.
Dim strPasswd
strPasswd = InputBox("Enter Password", "Restricted Form ")
If strPasswd = "YourPassWord" Then
DoCmd.OpenForm "YourFormName", acNormal
Else
Exit Sub
End If
Any ideas?
Mike Gurman
02-02-2001, 07:41 AM
If it was just a text box on a form, you would just have to go to the Input Mask property of the text box and change it to 'Password' (without the quotes)
I'm not sure if there is a way of doing it with InputBox, but I would recommend creating a little 'Login' form and using that - you can then get the user to enter Username and password, plus add a button to change password and so on.
HTH
Mike
[This message has been edited by Mike Gurman (edited 02-02-2001).]
Rich@ITTC
02-02-2001, 07:47 AM
Hi Talismanic
I don't think there is a password property for a message box (though I don't profess to be an expert in that area).
There is an input mask for a password available through a normal field on a form, so the way I have got round this is to use a Popup form, set to Modal, that has a field with the input mask property set to Password.
Elswhere in a table not accessible to users I have the password. On a close command button (to close the PopUp form and open the other form)there is an If/Then/Else code that checks if the entered value - hidden by ******* - is the same as the real password. If so, the password protected form is opened (or whatever else you want to happen). If no match, the user is told that the password is wrong (via a normal MsgBox).
Not magnificent - nor particularly secure against hackers but enough to keep my colleagues/users at bay.
HTH
Rich
(Oh heck - beaten to the answer by Mike Gurman again!)
[This message has been edited by Rich@ITTC (edited 02-02-2001).]
Talismanic
02-02-2001, 07:47 AM
Thanks Mike and Rich, I guess it may have to be done with a pop up form. It really surprises me that there isn't a way to do this with an input box.
It seems like the Inputbox would be as good a place as a text box to hide the input.
[This message has been edited by Talismanic (edited 02-02-2001).]
Mike Gurman
02-02-2001, 08:33 AM
Even the most (supposedly) secure password protection can be defeated by hackers; I've just downloaded a tiny utility that reveals masked passwords in any application just by moving the mouse over the ****s.
(It's actually quite useful if, like me, you find yourself administering dial up accounts that somebody else created, but I'd better not advertise it here for fear of misuse).
Mike
Talismanic
02-02-2001, 08:41 AM
Mike, that is a fact, as with most security when you password protect anything on a computer you are just protecting yourself from "dumb" users or maybe users that know enough to be dangerous but not enough to get around password prompts.
I tell people all the time if they store information on a computer it will never be completely secure.
I just laugh when I hear companies talk about secure credit card orders over the internet.
You could of course store the password in a module which in an mde would be secure.