exiting Access

  • Thread starter Thread starter MA
  • Start date Start date
M

MA

I am running a macro using QUIT EXIT, it exits my database
but I want to close Access also. Is there a command that
I can enter to automatically do this for me?
Thanks
MA
 
Ma,

There is a RunCommand, Exit macro action, and there is a Quit macro
action. As far as I know, both should close Access, but I have only
personally had much experience with Quit. If this is not working for
you, maybe for some reason there is a second instance of Access being
opened along the way, or maybe there is something in your application
which is not being closed.

- Steve Schapel, Microsoft Access MVP
 
I do have a *.bat file that opens access using
MSACCESS.EXE, it runs a macro that inports a *.txt file
and then closes my table. Is there an *.EXE file that
also closes Access?

MA
-----Original Message-----
Ma,

There is a RunCommand, Exit macro action, and there is a Quit macro
action. As far as I know, both should close Access, but I have only
personally had much experience with Quit. If this is not working for
you, maybe for some reason there is a second instance of Access being
opened along the way, or maybe there is something in your application
which is not being closed.

- Steve Schapel, Microsoft Access MVP
 
Ma,

Please post back with details of the .bat file and also the macro.

On the face of it, I can see no reason why a Quit macro action would
not close Access from a database opened by a .bat command.

- Steve Schapel, Microsoft Access MVP
 
-----Original Message-----
Ma,

Please post back with details of the .bat file and also the macro.

On the face of it, I can see no reason why a Quit macro action would
not close Access from a database opened by a .bat command.

- Steve Schapel, Microsoft Access MVP


.
This is the 1509import.bat file I am running:
CD\
CD "g:\access"
COPY /y 1509Head.txt+G:\ELTDATA\1509tag.txt
G:\ACCESs\1509Data.txt
"C:\Program Files\Microsoft Office\Office10
\MSACCESS.EXE" "g:\access\1509.mdb" /x Import
This is my Import macro within 1509.mdb:
SetWarnings - No
Run SQL - delete * from data
Transfer Text - Import Delimited
Import Specification
g:\access\1509data.txt
yes
Close - yes
quit - exit


Thanks,
MA
 
MA,

Thanks for the additional information.

I think the problem lies with the Close action in your macro. This is
not necessary, and should be removed. As there is no database object
open at the time, it is therefore closing the database itself. Once
the database is closed, good night, the macro dies before it gets to
the Quit action.

- Steve Schapel, Microsoft Access MVP
 
THANKS! that was my problem.
Since I emailed you yesterday, I have been bumbarded with
emails. How can I get my name off the "blind copy" as our
teck man calls it.
-----Original Message-----
MA,

Thanks for the additional information.

I think the problem lies with the Close action in your macro. This is
not necessary, and should be removed. As there is no database object
open at the time, it is therefore closing the database itself. Once
the database is closed, good night, the macro dies before it gets to
the Quit action.

- Steve Schapel, Microsoft Access MVP
 
MA,

It seems there are a lot of very active spams and virus-laden emails
going around at the moment. Unless your email provider can filter
them out, I'm afraid there's not much you can do, once "they" have
captured your address, apart from cancel your email account and set up
a new one with a new address. And then, *never* use your real email
address when you post to a public newsgroup!

- Steve Schapel, Microsoft Access MVP
 
Back
Top