从vba启动MS Access [英] Starting MS Access from vba
问题描述
有谁知道是否可以从VBA启动Access并将参数传递给它?
我想从vba启动一个数据库,但根据具体情况,它有两种不同的行为(例如,从加载的不同表单开始)。如果可能的话,使用shell命令(或其他一些等效方法)传递参数似乎也能正常工作。
谢谢。
Does anyone know if it is possible to start Access from VBA and pass an argument to it?
I would like to start a database from vba, but have it behave in two separate ways depending on the situation (for example, start with a different form loaded). It seems like passing an argument with the shell command (or some other equivalent method) would work well, if possible.
Thanks.
推荐答案
那里。
看看OpenCurrentDatabase Method"访问帮助主题。
问候,
鱼
Hi, there.
Take a look at "OpenCurrentDatabase Method" Access help topic.
Regards,
Fish
有谁知道是否可以从VBA启动Access并将参数传递给它?
我想从vba启动一个数据库,但根据具体情况,它有两种不同的行为(例如,从加载的不同表单开始)。如果可能的话,使用shell命令(或其他一些等效方法)传递参数似乎也能正常工作。
谢谢。
Does anyone know if it is possible to start Access from VBA and pass an argument to it?
I would like to start a database from vba, but have it behave in two separate ways depending on the situation (for example, start with a different form loaded). It seems like passing an argument with the shell command (or some other equivalent method) would work well, if possible.
Thanks.
打开另一个Access实例,并加载C:\Test \ Test.mdb数据库,并将strArgumentToPass定义的参数传递给此Access实例当前数据库中的变量:
To Open another Instance of Access with the C:\Test\Test.mdb Database loaded, and pass to this Instance of Access an Argument defined by the strArgumentToPass Variable in the Current Database:
应用程序自动化也是一个可以考虑的答案。我认为已经提供的那个可能对您更好,但这取决于您的确切要求。
Application Automation is also a possible answer to consider. I think the one provided already is probably better for you, but it depends on your exact requirements.
这篇关于从vba启动MS Access的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!