将参数从表单传递到宏? [英] Passing parameters from a Form to a Macro?

查看:60
本文介绍了将参数从表单传递到宏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的......让我们看看我是否可以正确解释。


我有一张表格。

在表格上有一个选择员工姓氏的下拉框。


然后我有一个显示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 | 行号


一般的想法是:
  1. 根据tblEmployee表中的所有员工姓氏创建一个Recordset。
  2. 循环显示这些姓氏,并为每个姓氏修改qryEmployeeSurvey查询的SQL属性。
  3. 使用当前姓氏作为文件名依次输出每个查询。
  4. 代码定义:
  1. Create a Recordset based on all Employee Last Names from the tblEmployee Table.
  2. Loop through these Last Names, and for each Last Name, modify the SQL Property of the qryEmployeeSurvey Query.
  3. Output each Query in turn using the Current Last Name as the File Name.
  4. Code Definition:
展开 < span class =codeDivider> | 选择 | Wrap | 行号


这篇关于将参数从表单传递到宏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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