查询子结构中的结果 [英] query results in a subform

查看:82
本文介绍了查询子结构中的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我是Access的新手,所以我定义需要帮助。我有一个带有两个组合框(出站)的表单:1.-城市名称和2.-邮政编码


这些组合框基于一个表格,我称之为SD并包含五个字段:城市名称,邮政编码,省,终端和运营商。


在表单上,​​我创建了一个命令按钮,用于根据名为Routing的查询搜索在组合框中输入的值。基本上查看组合框中的城市名称和邮政编码,并返回城市,邮政编码,省,终端和运营商。我的工作正常。


现在,我遇到的问题是我希望查询的结果显示为子表单,我可以让它工作。我已经基于query.routing创建了一个子表单,它只是显示所有结果。


欢迎任何建议。谢谢..!

Hello everyone,

I am very new to Access so I definetely need help. I have a form with two combo boxes (outbound): 1.- City Names and 2.- Postal Codes

These combo boxes are based on a Table which I called SD and contains five fields: City Names, Postal Codes, Province, Terminal and Carrier.

On the form I have created a command button that search for values entered in the combo boxes based on a query named Routing. Basically looks at the city names and postal codes in the combo boxes and returns the city, postal code, province, terminal and carrier. I got this working fine.

Now, the issue I am having is that I want the results from the query to be displayed as a subform and I can get this to work. I have created a sub-form based on the query.routing and all it does is to show all the results.

Any suggestions are welcome. Thanks..!

推荐答案

我怀疑(表格上的示例过滤。)可能是专门为您编写的;)
I suspect that (Example Filtering on a Form.) could have been written especially for you ;)



我怀疑(< a href =http://www.thescripts.com/forum/thread590551.html\"target =_ blank>在表格上过滤示例。)可能是专门为您编写的;)
I suspect that (Example Filtering on a Form.) could have been written especially for you ;)



您好NeoPa,



不知道为什么会发生这种情况以及如何解决这个问题...


谢谢,

Hi NeoPa,

I just got this workng fine by changing the command button from running a query to refreshing form data. However now I am getting the message: The expression OnEnter you entered as the event property setting produced the following error: The object doesn''t contain the automation object ''searchForm'' when I hit enter....It works fine if I click with the mouse on the button.

Any idea why this is happenning and how I can solve this...

Thanks,


您可以发布代码,以便我们可以看到它出错的地方吗?
Can you post the code so we can see where it went wrong?


这篇关于查询子结构中的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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