Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. If IsNull(DLookup("[NBK]", "Employees", "[Status]=1")) Then
  2. Retval = MsgBox("Login information not found - Please choose your role manually", vbOKOnly, "Login Error")
  3. Else
  4. log = DLookup("[NBK]", "Employees", "[Status]=1")
  5.  
  6. SQLnbk = " Update tbl_DateTracking SET NBK = "
  7. SQLnbk = SQLnbk & "'" & log & "' WHERE "
  8. SQLnbk = SQLnbk & "CaseId = '" & CaseId & "' AND OCC_Scenario = '" & OCC_Scenario & "';"
  9. End If
  10. DoCmd.RunSQL SQLnbk
  11.  
  12. If IsNull(DLookup("[NBK]", "Employees", "[Status]=1")) Then
  13. Retval = MsgBox( _
  14. "Login information not found - Please choose your role manually", _
  15. vbOKOnly, "Login Error")
  16. Else
  17. log = DLookup("[NBK]", "Employees", "[Status]=1")
  18. Me.txtNBK=log
  19.  
  20. SQLnbk = " Update tbl_DateTracking SET NBK = "
  21. SQLnbk = SQLnbk & "'" & log & "' WHERE "
  22. SQLnbk = SQLnbk & "UniqueID = " & Me.UniqueID
  23.  
  24. <...>
  25. CurrentDB.Execute SQLnbk, dbFailOnError
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement