How to cancel a form close in Close Event?

后端 未结 3 514
情歌与酒
情歌与酒 2020-12-20 15:58

I\'m sure this is very simple, but I can\'t find it. In the close event of an Access Form, how can I cancel closing the form? I have a test that counts the records in a tab

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-20 16:10

    Use the "Form_BeforeUpdate(cancel as integer)" event and set cancel to True.

    Notice that you simply will not be able to close at all unless you add some logic to actually allow updating the database.

提交回复
热议问题