如何在子表单中显示查询结果 [英] How to display query results in a subform

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

问题描述

大家好日子,


我有一个包含2种主要表格的数据库。第一个表单用于向数据库添加记录,并包含一个命令按钮,用于打开第二个表单以进行记录搜索。


在第二个表单上,我有两个我想要的组合框从中搜索。目前,我只是让搜索按钮运行一个查询,该查询在一个单独的屏幕中打开。这两个组合框都是相同的(它们彼此独立)。我希望在子表单中的表单上打开结果,但在我能够做到这一点之前,我需要能够只查看某些结果。我想要的是命令按钮运行一个只显示与组合框中的文本匹配的结果的查询。当我尝试将结果限制为时,我得不到返回的结果。如果我只是在没有任何限定where子句的情况下运行查询,我就可以很好地查询查询中的所有内容。


修复后我想在搜索表单的子表单中显示结果。这有可能吗?


非常感谢任何帮助。


谢谢,

Doug

Good day everyone,

I have a database with 2 main forms. The first form is used to add records to the database and contains a command button that opens the 2nd form for records searching.

On the second form I have tow combo boxes that I would like to search from. Currently, I just have the search button run a query which opens in a separate screen. This is the same for both combo boxes (they are independent of each other). I would like to have the results open on the form in a subform but before I can do that I need to be able to view only certain results. What I want is for the command button to run a query that only displays results that match the text in the combo box. When I try to limit that results to that I get no results returned. If I just run the query without any qualifying where clause I get everything in the query just fine.

After I get that fixed I want to display the results in a subform on my search form. Is any of this possible?

Any help would be greatly appreciated.

Thank you,
Doug

推荐答案

查看本教程(上的示例过滤表格)有助于Doug的概念。它应该。
See if this tutorial (Example Filtering on a Form) helps with the concepts Doug. It should.


谢谢。我会检查出来然后通知你。

Thank you. I will check it out and let you know.


查看本教程(在表单上过滤示例)有助于Doug的概念。这应该。
See if this tutorial (Example Filtering on a Form) helps with the concepts Doug. It should.


Hello NeoPa,


我查看了你的代码并试图让它适用于我的数据库但是我无法这样做。我很久没有从任何代码工作中删除了(那就是Perl)所以我担心我可能没有很好地遵循它。


我很乐意将数据库发送给你你想看看它。我希望现在不要搞砸了。


谢谢,

道格

Hello NeoPa,

I looked at your code and tried to make it work for my database but I was not able to do so. I am a long time removed from any code work (and that wasPerl) so I am afraid I probably did not follow it very well.

I would be happy to send you my database if you wnated to look at it. I hope it is not too screwed up right now.

Thanks,
Doug


查看本教程(表格上的示例过滤)是否有助于Doug的概念。这应该。
See if this tutorial (Example Filtering on a Form) helps with the concepts Doug. It should.


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

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