访问Excel的参数传递 [英] Access Excel parameter passing

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

问题描述

我在访问一个表,必须在Excel中访问。我可以轻松地建立它转储基于在VBA内特定细胞的整个表和筛选器,但因为我20,000记录它减缓了表的宏。

I have a table in access which has to be accessed in excel. I could easily set up a macro where it dumps the whole table and filters based on a particular cell within vba but since I have 20,000 records it slows up the sheet.

有没有传递参数的一个更快的方法?

Is there a faster way of passing parameter?

我尝试的方法是其中一个答案贴previously

The method I tried was one of the answers posted previously

•in Excel go to the data ribbon and click the From other sources icon
•click From Microsoft Query
•select MS Access Database* 
•browse for and select your database. 
•in the wizard select the columns you need to import
•on the next page select the column you want to filter on
•select the type of filter you need, i.e. Equals
•instead of selecting a value in the next box enter [Parameter please Bob]
•enter you sort on the next page
•select Return data to Microsoft Excel and finish

但我不知何故无法通过Excel单元格作为参数。我最终想获得在VBA这个运转,但试图找出如何工作进行手动操作。

But I am somehow not able to pass an excel cell as the parameter. I am ultimately trying to get this running in vba but trying to figure out how this works out manually.

任何帮助将是AP preciated。

Any help would be appreciated.

由于Aprough,然后通过你的程序,但无法选择的参数字段

Thanks Aprough, followed through your procedure but could not selects the Parameters field

推荐答案

一旦你拥有了一切设置,右键单击任意位置在返回的数据,然后选择参数。选择左侧的参数,然后选择从下面的单元格的值:,然后选择与您的参数的单元格。数据刷新每一次,它会使用该单元格作为参数值。这是怎么做到的手动

Once you have everything set up, right-click anywhere in your returned data and choose Parameters. Select your parameter on the left, and choose "Get the value from the following cell:" and then choose the cell with your parameter. Every time your data refreshes, it will use that cell as the parameter value. This is how you do it "manually"

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

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