如何设置“下拉”按钮查询参数列表? [英] How to put a "drop-down" list for a query parameter?
本文介绍了如何设置“下拉”按钮查询参数列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想为我的手术数据库创建一个查询,要求开始日期和结束日期(简单),但也要求外科医生使用下拉列表。此列表已存在(主数据库已使用此列表接受外科医生在其记录中的名称),但我不知道如何让用户从查询的参数中选择该列表。
这是'到目前为止查询'的SQL:
I want to create a query for my Surgery database that asks for a Start Date and an End Date (easy), but also asks for a Surgeon using a drop-down list. This list already exists (the main database already uses this list to accept surgeon''s names in its records), but I don''t know how to let the user choose from that list in the parameters to the query.
Here''s the query''s SQL so far:
展开 | < span class =codeLinkonclick =selectAll(this);>选择 | 换行 | 行号
推荐答案
您可以创建一个条件表单,然后允许用户输入[开始日期],[结束日期],并从组合框中选择[外科医生]。一旦验证了三个条件,您就可以修改由无条件组成的基本查询的SQL属性。然后,只需打开查询。我知道没有办法在参数化查询中显示标准选项列表。
You could create a Criteria Form, then allow the User to enter a [Start Date], [End Date], and select a [Surgeon] from a Combo Box. Once the three Criteria have been Validated, you can then modify the SQL Property of a Base Query consisting of no Criteria. Then, simply Open the Query. There is no way, that I am aware of, to display a List of Options for Criteria in a Parameterized Query.
啊,我明白了。好的,我会这样做,但我从来没有修改SQL属性。一个查询。该财产是如何获得的?我是否以我的形式's代码,将一个字符串放入该属性?或者是什么?
Ah, I see. Okay, I''ll do that, but I''ve never "modfied the SQL Property" of a query. How is that property accessed? And do I, in my form''s code, make a string to put in that property? Or what?
- 让我们假设你创建了一个Query(qryEmployees)来返回tblEmployees中的所有记录,即:
- Let''s assume you created a Query (qryEmployees) to return ALL Records in tblEmployees, namely:
展开 | 选择 | Wrap | 行号
这篇关于如何设置“下拉”按钮查询参数列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文