Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input box ? 1

Status
Not open for further replies.

authorsami

Instructor
Sep 11, 2003
155
US
I have the following code which brings up an input box where my users enter in a password to access the screens to follow. My question is whether I can have the password show up as ******* and not the actual words typed????

==
Dim X As Variant
Dim stDocName As String
Dim stLinkCriteria As String

X = InputBox("Please enter password to open this form:", "PASSWORD Prompt")
If X = "HarryPotter" Then
stDocName = "Switchboard"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
MsgBox ("Sorry, you can open this form.")
End If
===

Thank you
 
Instead of using InputBox you need to use your own mini-form that looks like an InputBox. Add a text box control to it for entering the password, then edit its properties - the one you want to change is 'Input Mask' on the 'Data' tab. If you click the ellipsis (...) on the right-hand side you get the Input Mask Wizard and you can select the 'Password' input mask from that.

You'll then need to change your procedure above to display your new form and get the contents of your text box.

Hope that helps.

N.
 
Oh great, I should have know using a pre-existing password input box was too easy.

I know how to create a form with a text box and format that (I hope). What do I need to change on my code listed above?
I'm new to this and need simple instructions, kinda like the "Dummy books"

:)

Sharon
 
Well dk should have the star really but thanx anyway

Chris ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top