VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Database to protect Application as Password

by Ts Bhusal (3 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 15th March 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Database to protect Application as Password

Rate Database to protect Application as Password



On Error Resume Next
With frmReg.Data1
    .DatabaseName = App.Path & "\database.mdb"
    .RecordSource = "reg"
    .Refresh
End With
If Text1.Text = "" Then
Text1.SetFocus
ElseIf Text2.Text = "" Then
Text2.SetFocus
ElseIf Text1.Text <> frmReg.Data1.Recordset.Fields("User") Then
MsgBox "You can not begin this software with this USER ID. Please try again..", vbCritical
Text1.Text = ""
Text1.SetFocus
ElseIf Text2.Text <> frmReg.Data1.Recordset.Fields("Password") Then
MsgBox "You entered an invalid password for " & Text1.Text & " .", vbCritical
Text2.Text = ""
Text2.SetFocus
Else
Me.Hide
mdiMain.Show
End If
frmReg.Data1.Database.Close
End Sub

Private Sub cmdQuit_Click()
Unload Me
End
End Sub

Private Sub Form_Load()
On Error Resume Next
Screen.MousePointer = vbNormal
Label3.Caption = frmReg.Data1.Recordset.Fields("Organization")
End Sub





Download this snippet    Add to My Saved Code

Database to protect Application as Password Comments

No comments have been posted about Database to protect Application as Password. Why not be the first to post a comment about Database to protect Application as Password.

Post your comment

Subject:
Message:
0/1000 characters