全新的Access需要通过表单中的txt框协助搜索 [英] Brand New to Access need Assist with Search via txt box in a form

查看:92
本文介绍了全新的Access需要通过表单中的txt框协助搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从excel电子表格导入了数据库。


我正在使用资产模板进行访问(Office365 ProPlus版本1904)。


不需要过滤器表格和表格,所以我将它们删除了。


我需要:

我正在寻找一个简单的搜索功能,可以让我在4到5列中搜索表单中的特定或关键字信息。如果可能的话,我宁愿不使用查询。


到目前为止我做了什么:

我带了模板附带的过滤器宏并将其转换为VBA以便于编辑。 (我的VBA知识是非常基本的FYI)我添加并删除了我知道我不需要的东西,比如参考Filter Details Form和Table设置temp vars。在QuickSearch下,我将列的过滤器名称更改为我从Excel电子表格导入的列。


我的问题:

我目前正在使用问题试图让命令按钮从模块通过宏调用函数或使用事件过程从模块调用特定的函数。


我会慷慨地接受任何帮助你们可以提供。


提前致谢!


代码如下:

I have the database imported from an excel spreadsheet.

I am using the Asset Template for Access (Office365 ProPlus version 1904).

The filter form and table were not needed so I removed them.

My need:
I am looking for a simple search function that allows me to Search across 4 - 5 columns for specific or keyword information in the form. I would prefer to not use a query if at all possible.

What I have done thus far:
I took the filters macro that came with the template and converted it to VBA for easier editing. (My VBA knowledge is very basic FYI) I added and removed things I knew I didn''t need like setting up temp vars in reference to the Filter Details Form and Table. Under QuickSearch, I changed the filter names for the columns to the columns I had imported from the Excel Spreadsheet.

My Issue:
I am currently having an issue trying to get the Command Buttons to either call the function from the Module via Macro or to use an Event Procedure to call the specific Function from the Module.

I would graciously accept any assistance you guys can provide.

Thanks in Advance!

Code is below:

展开 | 选择 | Wrap | 行号
解决方案

soapbox3000,

欢迎来到字节!


首先,在我们走得太远之前这实际上是一种过于复杂的非常简单的东西。道,我想问 你想要做什么?它看起来像是我见过的最复杂的基本搜索之一。


如果,你只是想搜索然后,如果表单显示了导航按钮(这是Access表单的内置功能),那么只需使用表单底部的搜索框。


但是,如果你必须为你正在显示的记录创建一个过滤器,这是一个完全不同的故事,可能还有一系列额外的问题,答案和我们需要的详细信息。


不要放弃希望 - 在我们给你更好的指导之前,我们需要了解更多。
soapbox3000,

Welcome to Bytes!

First, before we get too far down the "this is really an overcomplexification of avery simple thing" road, I want to ask exactly what it is you are trying to do? It looks like one of the most complicated basic searches I''ve every seen.

If, you simply want to "search for" something, then, if the form has the navigation buttons displayed (which is a built in feature of Access forms), then just use the search box at the bottom of your form.

But, If you must actually create a filter for the records you are displaying, that is an entirely different story and there is probably a series of additional questions, answers and calrifying details we will need on this one.

Don''t give up hope--we just need to know more before we can give you better guidance.


这篇关于全新的Access需要通过表单中的txt框协助搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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