A Forum all about DOS Batch
It is currently 26 Sep 2016 09:33

All times are UTC-06:00

Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 17 Jul 2012 08:12 

Joined: 17 Jul 2012 07:58
Posts: 2
Hello all.

I have very limited experience with writing .bat files. However, I wrote this very simple batch file which executes two Access macros:
CD \Program Files (x86)\Microsoft Office\Office14
MSACCESS.EXE "C:\...\Databases\final\file.accdb" /X test1
MSACCESS.EXE "C:\...\Databases\final\file.accdb" /X test2
CD \

The code executes fine, but requires me to add a "QuitAccess" line to the macros. If I don't, then the first macro will run (test1), but after that nothing will happen. Now in this example there are only 2 macros, but there are cases where I need to run much more macros. In such cases it is very weird to keep shutting down access after the execution of each macro, to be able to run the next one.

Of course I could solve this by creating macros which combine other macros within Access, but I really hope there is a solution to this through programming within the batch file. Of course I already searched the web for a solution, but unfortunately without result. I would be grateful if anyone could direct me to a possible way to solve this issue.

With kind regards

PostPosted: 17 Jul 2012 14:49 

Joined: 23 Dec 2011 13:59
Posts: 3215
I would say your best bet is to create a macro that calls the other macros.

PostPosted: 18 Jul 2012 02:28 

Joined: 17 Jul 2012 07:58
Posts: 2
That is unfortunate. I guess I have no other option at the moment indeed. Thank you for your input.

Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC-06:00

Who is online

Users browsing this forum: No registered users and 17 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited