我怎样才能从进入VBA更新查询提示的值? [英] How can I get a value from the update query prompt in Access VBA?

查看:157
本文介绍了我怎样才能从进入VBA更新查询提示的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们运行我们得到提示说,这么多recordr将要更新的一个更新查询。你想继续'是有可能的提示信息中的值捕捉到即记录将被更新数的变量。

When we run a update query we get prompt saying that 'these many recordr are going to be updated. do you want to continue' is it possible to capture the value in the prompt message to a variable i.e the number of records going to be updated.

推荐答案

如果您从code中的查询,您可以使用记录受影响的属性:

If you run the query from code, you can use the records affected property:

Dim db As Database
Set db=CurrentDB
db.Execute "Some SQL here"
db.RecordsAffected

如果你使用事务,你可以回滚。

If you use a transaction, you can rollback.

这篇关于我怎样才能从进入VBA更新查询提示的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆