Input Mask

RICKA

New member
Local time
Today, 17:30
Joined
Mar 23, 2005
Messages
27
HOW DO YOU PUT AN INSPUT MASK ON AN INPUT BOX IN VB?

eg.
Dim MESSAGE2, TITLE, DEFAULT, PASS, pass1, pass2
MESSAGE2 = "PLEASE ENTER YOUR PASSWORD NOW"
TITLE = "PASSWORD ENTRY"
DEFAULT = ""
PASS = InputBox(MESSAGE2, TITLE, DEFAULT)
pass1= "password1"
pass2= "password2"

If PASS = pass1 Then
DoCmd.OpenForm "MainMenu", acNormal
DoCmd.Close acForm, "Main", acSaveNo

ElseIf PASS = pass2 Then
DoCmd.OpenForm "OVERSEERS MENU", acNormal
DoCmd.Close acForm, "Main", acSaveNo

ElseIf Not PASS = pass1 Then
MsgBox "THE PASSWORD YOU ENTERED IS INCORRECT", vbCritical, "PASSWORD ERROR"
'DoCmd.Quit acQuitSaveNone


ElseIf Not PASS = pass2 Then
MsgBox "THE PASSWORD YOU ENTERED IS INCORRECT", vbCritical, "PASSWORD ERROR"
'DoCmd.Quit acQuitSaveNone
 
Ricka, please don't use the word Urgent. While it may be urgent to you it certainly is not to anyone else and will not get people jumping off their seats to answer you. Since this is the second time you've used the word in a thread title today I can guess it certainly is not urgent. And please don't use all caps when typing; it's rude and reminiscent of shouting.
 
As far as I know - you can't....

If you don't know already, you can make a custom dialog by creating a form with a text box and couple of buttons. The buttons set a global variable, and when you call it you pause the execution like this:

Code:
DoCmd.OpenForm "yourForm", acNormal, , , , acDialog

yourFieldOrVar = the_global_var
 
Input boxes are not the best tool to use in any application.

But, you can format the keyed values in an input box to hide the keyed password with astericks. If you had searched you might have found this old thread with the code 'Hooks' provided on how to do it... Password Security Management
 

Users who are viewing this thread

Back
Top Bottom