Hello,
I have a form in Access for users to do updates from. I'm trying to catch the error 2501 that pops up if they say cancel to the prompt that tells them how many records they are going to update and asks them if they want to continue or cancel.
Here is my code, but it is not working.....
Err_btnUpdate_C lick:
If Err.Number = 2501 Then
MsgBox "Update Cancelled.", vbOKOnly
Resume Exit_btnUpdate_ Click
Else
MsgBox "Error: " & Err.Number & " Description: " & Err.Description , vbOKOnly
End If
Also, if there isn't a way to get around this, and I just turn the warnings off......is there a way to get the number of records that are going to be updated from an SQL update query executed in the code so that I could display this to the user?
Thank you!
~ Franccesca
I have a form in Access for users to do updates from. I'm trying to catch the error 2501 that pops up if they say cancel to the prompt that tells them how many records they are going to update and asks them if they want to continue or cancel.
Here is my code, but it is not working.....
Err_btnUpdate_C lick:
If Err.Number = 2501 Then
MsgBox "Update Cancelled.", vbOKOnly
Resume Exit_btnUpdate_ Click
Else
MsgBox "Error: " & Err.Number & " Description: " & Err.Description , vbOKOnly
End If
Also, if there isn't a way to get around this, and I just turn the warnings off......is there a way to get the number of records that are going to be updated from an SQL update query executed in the code so that I could display this to the user?
Thank you!
~ Franccesca
Comment