Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Compare Database
- Option Explicit
- Private Sub Command19_Click()
- Dim rs As Recordset
- Dim db As Database
- Set db = CurrentDb
- Set rs = db.OpenRecordset("accessaccountinfo", dbOpenSnapshot, dbReadOnly)
- rs.FindFirst "uname='" & Me.Text0 & "'"
- If rs.NoMatch = True Then
- Me.Label11.Visible = True
- Me.Text0.SetFocus
- Exit Sub
- End If
- Me.Label11.Visible = False
- If rs!pinA <> Encrypt(Me.Text5, "") Then
- Me.Label12.Visible = True
- Me.Text5.SetFocus
- Exit Sub
- End If
- Me.Label12.Visible = False
- If rs!pinB <> Encrypt(Me.Text7, "") Then
- Me.Label12.Visible = True
- Me.Text5.SetFocus
- Exit Sub
- End If
- Me.Label12.Visible = False
- If rs!Password <> Encrypt(Me.Text9, "") Then
- Me.Label12.Visible = True
- Me.Text5.SetFocus
- Exit Sub
- End If
- Me.Label12.Visible = False
- If rs!status <> "active" Then
- Me.Label22.Visible = True
- Exit Sub
- End If
- DoCmd.OpenForm "renameme"
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement