Password Protected form

sbaig2

New member
Local time
Today, 23:05
Joined
Aug 10, 2006
Messages
4
Hi all

I want to use a password for just a form and a report not all the database
if any one have example please help

Baig
 
Hi - this should work for you - add this to the on click event of a button on a form where you wish your user to select the password protected form:


Code:
Dim strInput As String
Dim strMsg As String
Dim stDocName As String
Dim stLinkCriteria As String


strMsg = "Please Enter the password to open this form?"
strInput = InputBox(Prompt:=strMsg, Title:="Password Required")
If strInput = "your_password_here" Then

    stDocName = "frmProjects"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Else

End If

Once the button is pressed the user is prompted for a password - if entered correctly the form opens - if incorrect nothing happens. - form is not opened

hope this helps,

Regards - Ian
 

Users who are viewing this thread

Back
Top Bottom