任何人都可以帮我创建“查找”访问窗口 [英] Can Anybody help me to create "Find" Window in access

查看:62
本文介绍了任何人都可以帮我创建“查找”访问窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个与Access Find窗口完全相同的过程,可以在任何地方搜索任何内容。


例如表单包含一个或两个显示某些数据的子表单。用户可以选择子表单上的一个字段并单击按钮。将打开一个新表单并询问搜索项。当输入的搜索项目时,它应该找到所选子表单中的项目。

我用同一表格上的搜索项目做了这个,它工作正常。但是当它从其他形式完成时,我有一个错误。我使用了FindRecord方法。

感谢任何帮助。

I need to create a process exactly like Access Find window which can search anything anywhere.

e.g. A form contains one or two sub forms which show some data. The user can select one of the fields on the sub forms and clicks a button. A new form opens and asks the search item. When the search item in entered , it should find the item in the sub form selected.
I did this with the search item on the same form and it works fine. BUT when it is done from other form then I have an error. I used FindRecord method.
Any help is appreciated.

推荐答案

让我们首先要求你发布你已经拥有的代码尝试解释出了什么问题以及在哪里。


如果你已经让它在主窗体上工作然后让它在子窗体上工作应该是一个简单的问题来调整你的引用。请参阅参考子表单上的项目了解更多信息在这方面。
Let''s start by asking you to post the code you have already tried with an explanation of what went wrong and where.

If you already have it working on the main form then getting it to work on the subforms should be a simple matter of adjusting your references. See Referring to Items on a Sub-Form for more on that aspect.


实际上我在这里发布这个问题后取得了一些进展。


但不是100%。


代码有点长,实际上并不长,但在很多地方。


我的主要问题是参考

*主要表格

*子表格

*和焦点字段名称


BY变量名称。因为此搜索必须适用于用户打开的每个表单。当这些项目已知时,我必须使用以下内容:
Actually I made some progress since I posted this question here.

BUT not 100%.

The codes are little bit long, NOT actually long but in many places.

My main problem is to refer to the
* main form
* sub form
* and field name which had the focus

BY variable name. Because this search must work for every form the user opens. When these items are known then I have to use the followings:
展开 | 选择 | Wrap | 行号


这是代码和问题所在发生了 - 但没有出错。
That''s the code and where the problem occurred - but not what went wrong.


这篇关于任何人都可以帮我创建“查找”访问窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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