Cancel key action on Key Up

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 08:50
Joined
Jan 20, 2009
Messages
12,895
I use the KeyUp event with Delete key to mark a record as deleted instead of actually deleting it.

I have AllowDeletes set to No and I change the Status Bar text to get rid of the Deletes Not Allowed message. Still get the error sound. Works well enough I guess.

However I was wondering is it possible to actually cancel the original key action. If not, can I easily kill that sound?
 
Thanks Bob. It is surprising that the Key Events pages at MSDN don't mention that bit if vital information.

I had used KeyUp because the otherwise the delete action applied itself to the in focus control value when it finished my procedure.

With this piece of knowledge I could move it all to KeyDown and controlling the Status bar text was no long essential (though it is a nice touch).
 

Users who are viewing this thread

Back
Top Bottom