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

Recommended Answers

All 5 Replies

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
commented: Good +1

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

If this question already solved please mark thread to Solved :)

No it has not been solved but I'm still trying

what the problem now?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.