将多个查询导出到Excel中的多个工作表 [英] Export multiple queries to multiple sheets in excel

查看:124
本文介绍了将多个查询导出到Excel中的多个工作表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的,并且会马上承认,大部分都在我的头上,但我喜欢Access并且可以学习交易的滴答声。这是一个,我确定有一种方法,但我被卡住了。


当在表单中单击按钮时触发以下内容:

I''m new here and will admit right off the bat, most of this is above my head, but I like Access and learning the ticks of the trade so to speak. Here is one and I?m sure there is a way, but I?m stuck.

Below is triggered when a button is clicked in a form:

展开 | 选择 | Wrap | 行号

推荐答案

对不起套件


我知道你是在试图解释你的问题但是我实际上不能按照你的要求去做。请记住,我们无法看到您的数据库,并尝试用逻辑而不是代码来解释您的问题。


Mary
Sorry Kit

I know you are trying to explain your problem but I can''t actually follow what you are asking. Try to keep in mind that we cannot see your database and try to explain your problem with logic rather than in terms of code.

Mary


玛丽,


很酷,我能做到这一点,就在这里。 。 。 。


。 。 。我希望能够将查询结果导出到Excel工作簿,其中包含工作簿的管理员名称? 主管的名称和不同标签?向该经理报告名称。


通过这样的网站,我发现这样做的方法之一就是为每个主管和一个?DoCmd.TransferSpreadsheet单独查询? ,每个人。例如,如果有两个经理,一个有五个主管,另一个有十个,那将是十五个查询和十五个转移。


由于名称经常变化,所以也没有总是创建一个查询(用于名称更新)并在每次发生这种情况时更改宏或程序并且经常发生这种情况。


我正在为一种能够创造自我写作的方式而跳跃?可以通过?过程调用的查询?或宏,然后执行转移,没有我因为这个任务真的不适合我。


简写示例:

Mary,

Cool, I can do that, here goes. . . .

. . . I would like to be able to export query results to Excel Workbook(s) with the Workbook?s name of a ?Manager?s? name and distinct tabs of the ?Supervisor?s? name reporting to that Manager.

One of the ways I found to do this, via sites like this, is to have a separate query for each Supervisor along with a ?DoCmd.TransferSpreadsheet?, for each. For example if there are two Managers one with five Supervisors and the other with ten, that would be fifteen queries and fifteen transfers.

Since the names change frequently, it doesn?t make too much sense to always create a query (for the name updates) and change a macro or a procedure every time this happens and it happens a frequently.

I was hopping for a way of being able to create ?self-writing? queries that could be called by a ?procedure? or macro and then perform the transfer, without me because this task really is not for me.

Shorthand example:

展开 | 选择 | Wrap | 行号


Hi Kit


这不是我的专业领域。我要请其他一些专家来看看。


Mary
Hi Kit

This is not my area of speciality. I''m going to ask some of the other experts to have a look at it.

Mary


这篇关于将多个查询导出到Excel中的多个工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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