在没有提示的情况下运行删除查询? [英] Run a delete query without prompts?

查看:81
本文介绍了在没有提示的情况下运行删除查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有自动填充的字段,以便用户不必反复输入相同的信息。唯一的问题是用户可以继续点击新记录,因为这些信息会自动存储并导致表中的一堆(基本上)空白记录。我构建了一个删除查询,将删除任何未完全填写的记录。我希望它在用户完成填写表单(OnUnload)时运行,但我不希望它们被提示此查询正在运行(所以他们不要以为他们正在删除重要的东西)。可以在没有提示的情况下运行删除查询吗?


谢谢!

解决方案

在VBA中有一个DoCmd.SetWarnings正确/错误。

用你的查询包围。

展开 | 选择 | 换行 | 行号


< blockquote>


我有自动填充的字段,这样用户就不必反复输入相同的信息。唯一的问题是用户可以继续点击新记录,因为这些信息会自动存储并导致表中的一堆(基本上)空白记录。我构建了一个删除查询,将删除任何未完全填写的记录。我希望它在用户完成填写表单(OnUnload)时运行,但我不希望它们被提示此查询正在运行(所以他们不要以为他们正在删除重要的东西)。是否可以在没有提示的情况下运行删除查询?


谢谢!



你试过吗?

展开 | 选择 | Wrap | 行号


兔子,你打败了我!必须同时发布:-(


问候,

Scott


I have fields that autopopulate so that the user wont have to type in the same info over and over. The only problem with this is that the user can keep hitting new record because this info is automatically being stored and causes a bunch of (basically) blank records in the table. I built a delete query that will delete any records that arent completely filled in. I want it to run when the user is done filling in their form (OnUnload), but i dont want them to be prompted that this query is running (so they dont think they''re deleting something important). Is it possible to have a delete query run without the prompts?

Thanks!

解决方案

In VBA there''s a DoCmd.SetWarnings True/False.
Surround your query with that.

Expand|Select|Wrap|Line Numbers


I have fields that autopopulate so that the user wont have to type in the same info over and over. The only problem with this is that the user can keep hitting new record because this info is automatically being stored and causes a bunch of (basically) blank records in the table. I built a delete query that will delete any records that arent completely filled in. I want it to run when the user is done filling in their form (OnUnload), but i dont want them to be prompted that this query is running (so they dont think they''re deleting something important). Is it possible to have a delete query run without the prompts?

Thanks!

Have you tried?

Expand|Select|Wrap|Line Numbers


Rabbit, you beat me to it! Must have been posting at the same time again :-(

Regards,
Scott


这篇关于在没有提示的情况下运行删除查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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