I've recently run into an Access problem that has me a bit confused.

I have a form with a series of unbound checkboxes. Upon editing, I set a packed boolean field based off of the selection of these checkboxes.

I have a BeforeUpdate event that will eventually do data verification and then set the packed boolean field (though the data setting could easily be put into an afterupdate event).

What I'm trying to do now is simply cancel the update (something I will need to have working), reverting the checkbox status (checked or unchecked). The checkbox, however, does not revert. I assume it is because it is unbound and the orginal value is unavailable.

What I'm thinking on doing is having a variable at the form's scope to indicate to the afterupdate event a change is needed so that I can manually toggle the checkbox. What I'm wanting is someone to confirm that this is the most elegant way to proceed, becuase this seems too kludgy to me. Am I missing anything, is this how Access is supposed to behave?

Here is an example function:

'tm_masterkey is an unbound checkbox
Private Sub tm_masterkey_BeforeUpdate(Cancel As Integer)
Cancel = True
Me.tm_masterkey.Undo 'I believe this is extraneous, but I'm not certain of the full effect of the form's undo
Exit Sub
End Sub