将参数从表单传递到宏? [英] Passing parameters from a Form to a Macro?
本文介绍了将参数从表单传递到宏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好的......让我们看看我是否可以正确解释。
我有一张表格。
在表格上有一个选择员工姓氏的下拉框。
然后我有一个显示qry的按钮,将员工姓名作为标准传递:
Ok...let''s see if I can explain this properly.
I have a form.
On the form there is a dropdown box to select employee last name.
I then have a button to show a qry, passing the employee name as the criteria:
展开 | 选择 | Wrap | 行号
推荐答案
发布查询的SQL及其名称。
Post the SQL for the Query as well as its Name.
qryEmployeeSurvey
qryEmployeeSurvey
展开 | 选择 | Wrap | 行号
一般的想法是:
- 根据tblEmployee表中的所有员工姓氏创建一个Recordset。
- 循环显示这些姓氏,并为每个姓氏修改qryEmployeeSurvey查询的SQL属性。
- 使用当前姓氏作为文件名依次输出每个查询。
- 代码定义:
- Create a Recordset based on all Employee Last Names from the tblEmployee Table.
- Loop through these Last Names, and for each Last Name, modify the SQL Property of the qryEmployeeSurvey Query.
- Output each Query in turn using the Current Last Name as the File Name.
- Code Definition:
展开 < span class =codeDivider> | 选择 | Wrap | 行号
这篇关于将参数从表单传递到宏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文