[英]Suppress warnings in ms-access VBA
While developing forms in Access VBA I am trying to prevent access from adding a new record and then not giving any warning message.在 Access VBA 中开发表单时,我试图阻止访问添加新记录,然后不给出任何警告消息。 I can stop the record from being inserted but cannot supress the warning message.
我可以停止插入记录,但无法抑制警告消息。 I have set warnings to false on the after update event (and set warnings to true on the close event ).
我已将更新后事件的警告设置为 false(并在关闭事件上将警告设置为 true)。 Can anyone tell me which events I should code for this.
谁能告诉我应该为此编码哪些事件。 The reason for doing this is only while I develop the forms
这样做的原因只是在我开发表格时
Are you using a click event for any buttons?您是否对任何按钮使用单击事件? If so I would just suppress warnings in there.
如果是这样,我只会抑制那里的警告。 This setting will remain this way until you close the database and open it again.
此设置将保持这种方式,直到您关闭数据库并再次打开它。
DoCmd.SetWarnings (False)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.