Guest User

Untitled

a guest
Jul 19th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. If (Text7 & vbNullString) = vbNullString Then Exit Sub
  2. Dim rs As DAO.Recordset
  3. Set rs = Me.RecordsetClone
  4. rs.FindFirst "[UPK]=" & Text7
  5. If rs.NoMatch Then
  6. MsgBox "Sorry, no such record '" & Text7 & "' was found.", _
  7. vbOKOnly + vbInformation
  8. Else
  9. Me.Recordset.Bookmark = rs.Bookmark
  10. End If
  11. rs.Close
  12. Text7 = Null
  13. SetCheckinRecord
  14.  
  15. If IsNull(Me.CheckTime) Then
  16. CheckTime = Now()
  17. '***
  18. SAveAllRecords
  19. End If
  20. Me.Text7.SetFocus
  21. If Not IsNull(Me.CheckTime) Then
  22. MsgBox "This record has been entered already!", vbOKOnly
  23. UPK = ""
  24. End If
  25. And this other public function to save:
  26. If Me.Dirty Then
  27. Me.Dirty = False
  28. End If
  29. CheckTime = ""
  30.  
  31. If Me.Dirty Then
  32. Me.Dirty = False
  33. End If
  34. Checkin_Time = ""
Add Comment
Please, Sign In to add comment