Connecting to Command Prompt

C

Crazyhorse

Is it possible to connect from Ms Access to the Command Prompt. Put in
commands from access to the cmd.exe. We have to run reports off the cmd
prompt and I would like to connect from ms access to the cmd prompt.

Thanks
 
A

Albert D. Kallal

What you do is create some standard code in a standard module.

That code in the module can open (print) those reports you need.

eg:

Public Sub PrintInvoices

docmd.OpenReport "reprot1"
docmd.OpenReport "reprot1"
et.c

end sub


Make sure your application has no startup forms etc (to mess this up).
Perhaps even consider making a 2nd mdb with linked tables, and ONLY the
reports you need, and thus you not need to worry about startup forms etc.

I think explain how you can run code from the windows command prompt as a
script here:

http://www.members.shaw.ca/AlbertKallal//BartchJobs/Index.html
 
C

Crazyhorse

I have to connect to the command prompt and put in some code into the command
prompt and then all of the information from the server exports out to a text
file and then I import the data into the Ms Access.

Instead of manually inputing the code into the command Prompt I want the
user to click on a button to start up the command Prompt and then it will
enter the lines of code that I have into the command prompt.

Thanks
 
S

Steve Sanford

Thanks Stuart. I should have seen the doubled slashes.

I hate working nights.... :O
 
J

John M

I am writing a batch job (the old way with DOS) to run a macro in 6 different
Access databases. In the bat file, I tried to call a script similar to that
referenced in this thread for each database. The macro ran for the first
database but the batch job quit after that. How can I return control to the
batch job so it runs the other databases?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top