宏观行动,序列和通过领域 [英] Macro Actions, sequence & passing fields

查看:62
本文介绍了宏观行动,序列和通过领域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

宏中的动作是按顺序运行的吗? OpenQuery如何将其结果传递给动作列表中的OpenForm?


例如,我有一个表单#1,其中包含一些用于查询的文本框和一个带有OnClick的按钮,用于运行宏。宏操作是OpenQuery,查询名称设置为现有查询。该查询使用调用表单#1中的参数。这在我查看工作表视图中的结果时有效。


我想要做的是将OpenForm添加到Action列表作为下一个操作。我如何将第一个查询的结果传递给包含组合或列表框的OpenForm。

Are the Action(s) in a Macro run in sequence? How would a OpenQuery pass it''s results to a OpenForm that followed in the action list?

For example I have a form #1 that contains a couple of text boxes for a query and a Button with OnClick set to run a Macro. The Macro Action is OpenQuery with the Query Name set to an existing query. That query uses the parameters from the calling Form #1. This works when I look at the results in worksheet view.

What I want to do is add to the Action list a OpenForm as the next action. How would I pass the results of that 1st Query to the OpenForm that contails a combo or list box.

推荐答案

你不会。

你可以做的是将ComboBox的RecordSource设置为查询。
You wouldn''t.
What you can do is set the RecordSource of the ComboBox to the query.


我没有找到RecordSource。在我需要引用查询结果的ComboBox属性上。我确实找到了行源类型和行来源。如果它有助于我使用Access 2000.

我注意到的是,在我输入查询数据后,单击按钮,我得到第二个带有空组合框的表单。然后我将视图更改为数据表并在组合框属性中看到一个带有我给它的名称的列,右边有一个带有下拉箭头的空行。单击箭头我会在下面找到一行,其中包含所有字段名称和一行与orignal查询数据相匹配的行。


我在看什么。
I do not find the "RecordSource" on the ComboBox properties where I need to reference the query results. I do find "row source type" and "row source". If it helps I''m using Access 2000.
What I do notice is that after I enter query data, click button, I get the second form with an empty combo box. I then change the view to datasheet and see a single column with the name I gave it in the combo box properties, a empty row with a drop down arrow available on right. Clicking the arrow I get a row below with all of field names and a single row that matches the orignal query data.

Am I over looking something.



我找不到RecordSource在我需要引用查询结果的ComboBox属性上。我确实找到了行源类型和行来源。
I do not find the "RecordSource" on the ComboBox properties where I need to reference the query results. I do find "row source type" and "row source".



我的坏 - 是的RowSource。 RowSourceType应该是表/查询。

My bad - yes RowSource. RowSourceType should be Table/Query.


我注意到在输入查询数据后,...
What I do notice is that after I enter query data, ...



查询数据是什么意思?

What do you mean by Query Data?


...点击按钮,我得到第二个带有空组合的表格框。然后我将视图更改为数据表并在组合框属性中看到一个带有我给它的名称的列,右边有一个带有下拉箭头的空行。点击箭头我会在下面找到一行,其中包含所有字段名称以及与orignal查询数据匹配的单行。


我在看某事。
... click button, I get the second form with an empty combo box. I then change the view to datasheet and see a single column with the name I gave it in the combo box properties, a empty row with a drop down arrow available on right. Clicking the arrow I get a row below with all of field names and a single row that matches the orignal query data.

Am I over looking something.



我害怕我不能完全跟随其他人,因为我不知道'你在哪里''在这个过程中。 />
如果你可以更仔细地重新考虑最后一点,我会尽力帮助。

I''m afraid I don''t really follow the rest as I don''t know ''where'' you are in the process.
If you could rephrase the last bit a little more carefully perhaps, I''ll give what help I can.


这篇关于宏观行动,序列和通过领域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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