Solved

Stopping autostart forms when opening Access from VB

Posted on 1998-02-17
7
315 Views
Last Modified: 2010-08-05
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
Comment
Question by:cmy9
7 Comments
 
LVL 7

Expert Comment

by:kamall
ID: 1457282
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
 
LVL 2

Expert Comment

by:marti
ID: 1457283
Why not using '/cmd' command-line option?
0
 

Author Comment

by:cmy9
ID: 1457284
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 6

Expert Comment

by:anthonyc
ID: 1457285
Analyse Forms/Reports/Macros etc or data tables and queries?
0
 
LVL 2

Accepted Solution

by:
marti earned 200 total points
ID: 1457286
Holding (or holding simulation) the SHIFT key will prevent autoexec macro from executing. I hope this will work for you.
Regards
0
 

Author Comment

by:cmy9
ID: 1457287
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
 
LVL 2

Expert Comment

by:marti
ID: 1457288
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now