使用搜索表单删除记录 [英] delete records using search form

查看:63
本文介绍了使用搜索表单删除记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个删除记录的表单,但我在主窗体中使用未绑定的控件来设置过滤将在子表单中查看的记录的条件

我在主窗体中删除了命令按钮

我只需要在设置查看详细信息的条件后单击查找然后单击删除,子窗体中的数据将被删除

我不喜欢在子表单中使用级联删除,因为记录将填充(删除),如果表单不是用户友好

提前感谢任何帮助你可以为我提供


I have a form for deleting records but I use unbound controls in the mainform to set the criteria of filtering the records that will be viewed in the subform
I have delete command button in the mainform
I just need when i set the criteria for viewing the details after click Find then click delete, the data in the subform to be deleted
I don''t like to use cascade delete in the subforms because the record will filled with (deleted) and in the case the form will not be user friendly
thanks in advance for any help you may provide me with

推荐答案

首先,让我们看看使用未绑定控件的搜索表单的设计。 表单上的示例过滤应涵盖适用于您的内容。 />

接下来,删除记录的命令按钮。这可以在一组记录或当前选择的记录上完成。使用相同的过滤器,使用删除查询最容易完成筛选列表。单个记录也可以使用删除查询完成,过滤记录的ID,但同样可以使用:
Firstly, let''s look at the design of a search form using unbound controls. Example Filtering on a Form should cover that for you.

Next, a command button to delete the record. This can be done on a set of records or the currently selected one alone. A filtered list would most easily be done with a delete query using the same filter. An individual record could also be done with a delete query, filtering on the ID of the record, but equally could be done using :
展开 | 选择 | 换行 | 行号


@NeoPa




我需要知道如何在vba代码中使用sql语句删除过滤记录

非常感谢
@NeoPa

I need to know about how to delete filtered records using sql statement within vba code
thank you very much


假设那样如果已经过滤了子表单,则需要执行类似于以下内容的SQL:
Assuming then, that you have your subform already filtered, you would need to execute some SQL similar to the following :
展开 | 选择 | Wrap < span class =codeDivider> | 行号


这篇关于使用搜索表单删除记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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