E
ESquared
I did finally find a workaround, although I don't know how globally thi
can be applied, as I've only used it on one form so far. I sure hope i
helps someone avoid some frustration.
Access (sometimes?) runs certain events in this order when you click o
the checkbox:
Control_GotFocus
Form_BeforeUpdate
Form_BeforeUpdate (yes, twice, and in certain instances all the primar
key autonumber columns have sequential values starting at 1 the firs
time, then have their proper server-side values the second time, bu
that's not related to this issue.)
Control_BeforeUpdate
Chb_AfterUpdate
Control_Click
The crash always happens immediately after one of the form_beforeupdat
events (and before the control's beforeupdate event). If both of thos
beforeupdates cancelled then the crash does not occur. So my workaroun
was surprisingly simple:
Declare a global boolean, something like gfPreventUpdate.
* In the control's GotFocus event:
gfPreventUpdate = True
* In the form's BeforeUpdate event:
Cancel = gfPreventUpdate
* In the control's BeforeUpdate, AfterUpdate, or Click event (whicheve
is convenient for you):
gfPreventUpdate = False
Eri
can be applied, as I've only used it on one form so far. I sure hope i
helps someone avoid some frustration.
Access (sometimes?) runs certain events in this order when you click o
the checkbox:
Control_GotFocus
Form_BeforeUpdate
Form_BeforeUpdate (yes, twice, and in certain instances all the primar
key autonumber columns have sequential values starting at 1 the firs
time, then have their proper server-side values the second time, bu
that's not related to this issue.)
Control_BeforeUpdate
Chb_AfterUpdate
Control_Click
The crash always happens immediately after one of the form_beforeupdat
events (and before the control's beforeupdate event). If both of thos
beforeupdates cancelled then the crash does not occur. So my workaroun
was surprisingly simple:
Declare a global boolean, something like gfPreventUpdate.
* In the control's GotFocus event:
gfPreventUpdate = True
* In the form's BeforeUpdate event:
Cancel = gfPreventUpdate
* In the control's BeforeUpdate, AfterUpdate, or Click event (whicheve
is convenient for you):
gfPreventUpdate = False
Eri