G
Guest
I have a modal form with buttons for save and cancel. The form's close
button is set to No and the navigation buttons are set to No.
This is all done as I want to run various checks on the data before I save
it. In my testing I have found that CTRL+F4 will close the form and try to
save the record. This comes up with a MS Access error message, 'You can't
save this record at this time etc.', which will not be helpful to the users.
I have tried to trap for CTRL+F4 by setting 'Me.KeyPreview = True' in the
Form Load event and looking for the ascii code in the Key Press event on the
form. It appears that the Key Press event doesn't fire. Can someone help me
to find what event fires when CTRL+F4 is pressed so that I can trap it and
cancel the changes neatly.
Thanks,
Paul.
button is set to No and the navigation buttons are set to No.
This is all done as I want to run various checks on the data before I save
it. In my testing I have found that CTRL+F4 will close the form and try to
save the record. This comes up with a MS Access error message, 'You can't
save this record at this time etc.', which will not be helpful to the users.
I have tried to trap for CTRL+F4 by setting 'Me.KeyPreview = True' in the
Form Load event and looking for the ascii code in the Key Press event on the
form. It appears that the Key Press event doesn't fire. Can someone help me
to find what event fires when CTRL+F4 is pressed so that I can trap it and
cancel the changes neatly.
Thanks,
Paul.