Auto launching an mdb containing an autoexec macro

  • Thread starter Thread starter Mark Matzke
  • Start date Start date
M

Mark Matzke

I am using the Scheduled Task option in Windows 2000 to
auto run MDB programs that contain autoexec files ending
with an exit command. This works great!

My proboem is after a MDB is autoexecuted, when I open an
existing database, I get limited tools and accessability.

This problem is corrected when openning and closing a
blank database.

Is there a command I can add to my existing database to
bring back the full tools and accessabilities without
having to manually create and dlose a new database?
 
Are you using an Exit or a Quit command? Could make a
difference.

Try DoCmd.Quit if you haven't already.

Gary Miller
Sisters, OR
 
Using the Exit command, quit doesn't exit the full
program. I need numbers imported on days that I am out of
the office because the temp files are cleared daily.
 
Mark,

I beg to differ with you. Quit does totally close Access.
AFAIK, Exit just exits a code routine or a section of one.
Could be exactly why the Application is still running in the
background. See the following from help. It may not paste
correctly.

Gary Miller

Quit Method (Application Object)


The Quit method quits Microsoft Access. You can select one
of several options for saving a database object before
quitting.

Syntax

Application.Quit [option]

The Quit method has the following argument.

Argument Description
option An intrinsic constant that specifies what
happens to unsaved objects when you quit Microsoft Access.
This argument can be any of the following constants.
Constant Description

acSaveYes (Default) Saves all objects without
displaying a dialog box.
acPrompt Displays a dialog box that asks whether you
want to save any database objects that have been changed but
not saved.
acExit Quits Microsoft Access without saving any
objects.


Remarks

The Quit method has the same effect as clicking Exit on the
File menu. You can create a custom menu command or a command
button on a form with a procedure that includes the Quit
method. For example, you can place a Quit button on a form
and include a procedure in the button's Click event that
uses the Quit method with the option argument set to
acSaveYes.
 
Back
Top