Advertisement
Guest User

auth code

a guest
Jan 14th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. Option Compare Database
  2. Option Explicit
  3.  
  4. Private Sub Command19_Click()
  5. Dim rs As Recordset
  6. Dim db As Database
  7.  
  8. Set db = CurrentDb
  9. Set rs = db.OpenRecordset("accessaccountinfo", dbOpenSnapshot, dbReadOnly)
  10.  
  11.  
  12.  
  13. rs.FindFirst "uname='" & Me.Text0 & "'"
  14.  
  15. If rs.NoMatch = True Then
  16. Me.Label11.Visible = True
  17. Me.Text0.SetFocus
  18. Exit Sub
  19. End If
  20. Me.Label11.Visible = False
  21.  
  22. If rs!pinA <> Encrypt(Me.Text5, "") Then
  23. Me.Label12.Visible = True
  24. Me.Text5.SetFocus
  25. Exit Sub
  26. End If
  27. Me.Label12.Visible = False
  28.  
  29. If rs!pinB <> Encrypt(Me.Text7, "") Then
  30. Me.Label12.Visible = True
  31. Me.Text5.SetFocus
  32. Exit Sub
  33. End If
  34. Me.Label12.Visible = False
  35.  
  36. If rs!Password <> Encrypt(Me.Text9, "") Then
  37. Me.Label12.Visible = True
  38. Me.Text5.SetFocus
  39. Exit Sub
  40. End If
  41. Me.Label12.Visible = False
  42.  
  43. If rs!status <> "active" Then
  44. Me.Label22.Visible = True
  45. Exit Sub
  46. End If
  47.  
  48. DoCmd.OpenForm "renameme"
  49.  
  50.  
  51.  
  52.  
  53. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement