通过表单查询参数 [英] Query parameters through a Form
本文介绍了通过表单查询参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个表格,里面有各种组合框。这些组合框用作查询中各个字段的参数的引用。命令按钮打开一个查询,其中包含从表单中选择的参数。
我遇到两个从同一个表中提取数据的组合框有问题。这两个组合框称为:txtActor和txtDirector。我正在尝试生成一个查询来显示演员和导演(或演员和演员)的任何组合,从表格CAST中显示。
我用它们作为过滤器:
展开 | 选择 | Wrap | 行号
解决方案
只需将你所拥有的,改为和:
展开 | 选择 | Wrap | 行号
@NeoPa
NeoPa:
这是我查询的SQL。当我通过用AND替换OR来修改第二个WHERE子句时,qTest不会给我任何数据。
展开 | 选择 < span class =codeDivider> | Wrap | 行号
我解决了自己的问题。如果其他人可以找到这个有用的,这就是我所做的。
1.创建一个查询(qCast)过滤字段(txtActor)和(txtDirector)的表单。
2.基于frist查询(qCast)创建第二个查询(qCast2),限制为无重复项目。
3.基于qCast2创建报告。在报告页面的顶部,我添加了两个文本框,以显示在fReportList上选择的名称。
感谢所有试图提供帮助的人。非常感谢。
以下是 qCast 的SQL
展开 | 选择 | Wrap | 行号
I have a Form where there are various combo boxes. These combo boxes are used as references for the parameter of various fields in a query. A command button opens a query with the parameters selected from the form.
I am having problem with two combo boxes which pulls data from the same table. These two combo boxes are called: txtActor and txtDirector. I am trying to generate a query to display any combination of actor and director (Or actor and actor) from the table called CAST.
I used these as a filter:
Expand|Select|Wrap|Line Numbers解决方案Simply change the Or you have, to an And :
Expand|Select|Wrap|Line Numbers
@NeoPa
NeoPa:
Here is the SQL for my query. When I modify the second WHERE clause by replacing OR with AND, the qTest does not give me any data.
Expand|Select|Wrap|Line Numbers
I solved my own problem. In the event someone else could find this helpful, here is what I did.
1. Created a query (qCast) filtering a form for the fields (txtActor) and (txtDirector).
2. Created a second query (qCast2) based on the frist query (qCast) restricting to no duplicate item.
3. Created a report based on qCast2. On top of the report page I added two text boxes to display the names selected on fReportList.
Thanks for all those who tried to help. Much appreciated.
Here are the SQL for qCast
Expand|Select|Wrap|Line Numbers
这篇关于通过表单查询参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录发送“验证码”获取 | 15天全站免登陆