Input Box

  • Thread starter Thread starter Jone
  • Start date Start date
Can I make an input mask in an input box ?

You can't.
You'll have to create your own unbound form.
Add an unbound text control.
Set the control's Input Mask property to Password.
Add a command button.
Code It's Click event:
Me.Visible = False
Name this form "PassForm"

Then instead of opening the InputBox() open this form, using:

DoCmd.OpenForm "PassForm", , , , , acDialog
If forms!PassForm!ControlName = "The Password" Then
' Password's OK. Do something
Else
' Password not OK. Don't do something here
End If
DoCmd.Close acForm, "PassForm"

When you open the PassForm, processing will halt until the password
has been entered and the PassForm command button has been clicked.
Then processing will continue and the PassForm will be closed.
 
An input box allows a user to enter:

A formula
A number
Text (a string)
A logical value (True or False)
A cell reference, as a Range object
An error value, such as #N/A
An array of values

Depending on the data type you specify. I don't know what a mask is.
 
"Sweety" I asked if I can make my input box should have an input mask e.g.
"****" because this is my password !!!
 
Jone said:
"Sweety" I asked if I can make my input box should have an input mask
e.g. "****" because this is my password !!!

No. You need to use a dialog form instead of an input box.
 
Back
Top