Hi Iram
You would be better using user level security than a self made simple form.
At the very basic you could use a text box to input text and if the text did
not = what was needed then you can't go to the form. BUT "anyone" with even
a very basic knowledge of access will get round this
This sort of thing
Private Sub TextBoxName_Click()
Static Counter As Integer
If TextBoxName = "SomeText" Then
DoCmd.OpenForm "SomeForm", acNormal, "", "", , acNormal
DoCmd.Close acForm, "PasswordForm"
Else
If Counter < 2 Then
MsgBox "Some text here - try again - Max 3 attempts", vbOKOnly,
"Some title"
Counter = Counter + 1
TextBoxName = ""
Else
DoCmd.Quit
End If
End If
End Sub
But you may want to look at this link
http://support.microsoft.com/default.aspx/kb/207793/en-us
download the paper and study it then
______________________________________
PRACTICE ON A BACKUP OF YOUR DATABASE
______________________________________
or you may be "very" upset if you can't get into your own DB
Note that even this method can be "got-around" but it's worth giving a trying
good luck