从更新查询提示中获取值 [英] Getting a value from the update query prompt

查看:46
本文介绍了从更新查询提示中获取值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们运行更新查询时,我们得到提示说,这些许多记录将被更新.您要继续吗?是否可以将提示消息中的值捕获到变量中,即要更新的记录数.

When we run a update query we get prompt saying that 'these many records 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.

推荐答案

如果通过代码运行查询,则可以使用记录受影响的属性:

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.

这篇关于从更新查询提示中获取值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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