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

so, what do you want?
[code=vb.net]
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

[/code]

Jump to Post

All 5 Replies

Re: Vb.net in formdocs 80 80

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
Re: Vb.net in formdocs 80 80

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

Re: Vb.net in formdocs 80 80

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

Re: Vb.net in formdocs 80 80

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

Re: Vb.net in formdocs 80 80

what the problem now?

Be a part of the DaniWeb community

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