Take a look at
http://www.databasejournal.com/feat...the-InputBox-function-for-MS-Access-Forms.htm
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Can you please tell me how to apply this on a form, cause everything
you
said
went over my head.
I would appreciate if anyone could tell me how to this step by step.
:
Instead of using the InputBox function, which is cheap and cheerful
but
very
limited, create a dialogue form with a text box with an input mask
property
of PASSWORD. Add a button to the form with code in its Click event
procedure:
Const MESSAGETEXT = "Incorrect password."
If StrComp(Me.txtPassword, "Password", vbBinaryCompare) = 0 Then
DoCmd.OpenForm "'YourForm'"
DoCmd.Close acForm, Me.Name
Else
MsgBox MESSAGETEXT, vbExclamation, "Warning"
Me.txtPassword = Null
Me.txtPassword.SetFocus
End If
This will require a case-sensitive password to be entered. Open the
dialogue
form in code whenever you want to open 'YourForm'. This is of course
extremely insecure as anyone can open YourForm directly or can open
the
dialogue form's module and see the password.
Ken Sheridan
Stafford, England
Aamer wrote:
I found one solution on this forum
Private Sub Command0_Click()
Dim strpassword As String
strpassword = InputBox("Password")
If strpassword = "Password" Then
DoCmd.OpenForm "Your Form"
Else: End If
DoCmd.Close acForm, "Your Form"
End Sub
But the problem is when i enter the password it shows the letters,
infact it
should show ***** as I enter password.
yes i agree this is not a good solution but so far it will work, as
long
as
it does not show the charactors i type.
In a word: No. You might be able to cobble up something that acts
like a
password on a from or report, but that wouldn't stop someone from
opening it
[quoted text clipped - 15 lines]
aamer
--
.
.