[AccessD] Form BeforeUpdate

Gustav Brock Gustav at cactus.dk
Sun Jun 22 09:33:49 CDT 2008


Hi Tony

I've never had much success with CancelEvent, at least not consistent.

It seems to be a macro thing which cannot cancel keypress events:

  http://msdn.microsoft.com/en-us/library/bb237789.aspx 

I have had to revert to SendKeys to press Esc once or twice.

/gustav

>>> iggy at nanaimo.ark.com 22-06-2008 14:37 >>>
Hey All
I am trying to use the BeforeUpdate on a bound continuous form. The code 
works and checks the data in the current record for validation and if an 
error is found it pops up a message and fires the docmd.cancelevent (or 
cancel = true).
Everything works fine, except when I click on the add, delete, or close 
buttons (mine) in the form's footer, then the code works fine and the 
message pops up, but the docmd.cancelevent doesn't fire. Is this a bug, 
or am I missing something.






More information about the AccessD mailing list