Cancel Update Problem

Meltdown

Registered User.
Local time
Today, 19:11
Joined
Feb 25, 2002
Messages
472
Hi all,

I'm trying to cancel an update to a control with:
Cancel = True

...in the BeforeUpdate event, but for some reason I can't leave the control after I attempt to modify the data, the cursor just remains flashing in the control.

Does anyone know what the problem is?

Using Access 2007.

Thanks
 
Are you using the FORM's Before Update event or the control's Before Update event. And, what code are you actually using? You can't just assign Cancel=True or it will cancel the event and you will be in a perpetual loop.
 
Hi Bob, I'm using the controls Before Update event.

My code is:

PHP:
Private Sub Invoice_Amt_BeforeUpdate(Cancel As Integer)

If ReadSecGrp(CurrentUser) = "Finance" Then
Cancel = True
Exit Sub
End If

End Sub

Regards
melt
 
Last edited:
I think you're right Bob, I do seem to be stuck in a perpetual loop, but how to break out of it?
 
So why are you canceling the update if the user is Finance? If you can't let them change it, why not just lock the control so it can't be changed by them
 

Users who are viewing this thread

Back
Top Bottom