• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 325
  • Last Modified:

Stopping autostart forms when opening Access from VB

I have a program which opens an Access database from within VB.
When it opens a database that has an autostart macro or form it automatically runs it but I want to open it in design mode only.
There do not seem to be any parameters on the OPENCURRENTDATABASE command.

How can I stop them being executed ?
0
cmy9
Asked:
cmy9
1 Solution
 
kamallCommented:
You can use the 'Data Form Designer' (VB4) or 'VB Application Wizard' (VB5) to automatically create your data forms directly from the database. Your project will not show the forms or run the macros stored inside the database.

Best regards
0
 
martiCommented:
Why not using '/cmd' command-line option?
0
 
cmy9Author Commented:
I am trying to analyze Access databases created by other users WITHOUT modifying them.

Try this on the Northwind database supplied with Access:
- Create a new VB5 project and add the Access 8.0 reference
- Use "access.OpenCurrentDatabase ("path\northwind.mdb")

You will see that the initial startup form appears.
I want to open this database without starting this form.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
anthonycCommented:
Analyse Forms/Reports/Macros etc or data tables and queries?
0
 
martiCommented:
Holding (or holding simulation) the SHIFT key will prevent autoexec macro from executing. I hope this will work for you.
Regards
0
 
cmy9Author Commented:
I am aware that holding down the shift key when opening Access manually stops autostart forms/macros running but how do I simulate this from within VB when opening an OLE conversation ?

I guess you are suggesting it is possible to simulate the shift key in conjunction with a SHELL command but will this then give me  the ability to use OLE automation (e.g. the use of the MODULES collection) and if so, how do I do this simulation ?


0
 
martiCommented:
I was able to establish OLE Automation with '\northwind.mdb', manualy holding the Shift. Isn't it what you are looking for?
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now