Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. Private Sub btnAddRec_Click()
  2. Refresh
  3. With CodeContextObject
  4. On Error Resume Next
  5. DoCmd.GoToRecord , , acNewRec
  6. If Err.Number <> 0 Then
  7. btnAddRec.Enabled = False
  8. End If
  9. End With
  10. End Sub
  11.  
  12. Private Sub btnAddRec_Click()
  13. On Error GoTo Err1
  14. DoCmd.GoToRecord , , acNewRec
  15. Exit Sub
  16. Err1:
  17. Description.SetFocus
  18. btnAddRec.Enabled = False
  19. MsgBox (Err.Description)
  20.  
  21. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement