Formdocs has given me the following code. What I am trying to accomplish is make the form undeleteable without a password. While the code kinda works all you have to do it select cancel and you can delete the record. any Ideas other than go back to class and pay attention

Const PW = "nimda"
Dim sInput As String

sInput = InputBox("Enter Password to Open: ")

If (sInput <> PW) Then

Beep()

Msgbox ("Invalid password, cannot Open...")

Cancel = True

End If


Thanks in advance

so, what do you want?

Const PW = "nimda"
        Dim sInput As String

        sInput = InputBox("Enter Password to Open: ")

        If (sInput <> PW) Then
            Beep()
            MsgBox("Invalid password, cannot Open...")
        Else
            'code to delete record
        End If
Comments
Good

what I would like is the record cannot be deleted unless the correct password is entered, also could I put this code in another event area and keep forms from opening without the correct password
Thanx
Boudie

This question has already been answered. Start a new discussion instead.