Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 DoCmd.RunSQL 方法根据用户在表单中执行的操作来插入和删除记录。它工作正常,但在删除或附加记录之前要求确认。如何删除确认。
顺便说一句,BeforeDelConfirm 事件似乎没有与 DoCmd.RunSQL 一起运行。
您可以使用它,而不是使用它DoCmd.RunSql来运行您的 SQL 并担心警报。
DoCmd.RunSql
Dim sql as string Dim dbs as DAO.Database set dbs = CurrentDb() sql = "INSERT INTO table(field1) VALUES(1)" dbs.Execute sql, dbFailOnError dbs.close set dbs = nothing