#Deleted on Form [英] #Deleted on Form

查看:67
本文介绍了#Deleted on Form的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好


我有一个表格,我有一个复选框。单击该复选框时,它会检查该值是否为true(已选中)。如果是,它将获取表单中的当前记录,提示输入一些信息(输入框)并通过sql insert将值写入表中。然后从表单中删除记录。

显示的表单数据基于从2个组合框中选择的值。记录集可能有超过1条记录。复选框用于已售出。这意味着该商品已售出。如果我尝试删除第二个项目,则删除第一个项目(单击复选框)后,是的。或者点击表单中的任意位置,我会看到一个访问框并说删除记录。有没有办法压制这个?我试过关掉警告,但它不起作用。


谢谢

Terry

Hello

I have a form where i have a checkbox. When the checkbox is clicked, it checks to see if the value is true (checked). If it is, it takes the current record in the form, prompts for some information (input boxes) and writes the values to a table via sql insert. Then deletes the record from the form.
The form data displayed is based on values selected from 2 combo boxes. The records set could have more than 1 record. The checkboxes are for "Sold". Which means the item was sold. Probem is is that after deleting the first item (clicking the checkbox) if I try to delete a second item; or click anywhere in the form, I get an access box come up and say "Record is deleted". Is there any way to suppress this? I have tried turning off warnings, but it does not work.

Thank you
Terry

推荐答案

在运行SQL并删除当前记录以便重新填充当前数据之后,您可能需要使用Me.Requery重新查询记录集。这应该照顾你的问题。
It looks like you may need to requery the recordset with Me.Requery after running your SQL and deleting the current record in order to repopulate with the current data. That should take care of your issue.


感谢您的回复

我确实尝试了重新查询,但是我得到了一个访问框,说我必须保存该字段在执行重新查询操作之前。


有关于此的任何想法吗?


谢谢

Terry
Thank you for your response
I did try the requery, but I get an access box saying I must save the field before performing the requery action.

Any ideas about that?

Thank you
Terry


您单击的复选框是否使用SQL重新写入另一个表然后删除记录绑定控件?如果是,你应该插入
Is the checkbox you click that uses SQL to re-write to another table then deletes the record a bound control? If it is, you should insert
展开 | 选择 | Wrap | 行号


这篇关于#Deleted on Form的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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