Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2005
    Location
    England.
    Posts
    232

    Unanswered: Opening an MS DOS command prompt within the code.

    Guys, any idea how I can use Access VBA (and it has to be VBA and not a macro) to open an MS DOS command prompt from within a form?

    What I'm really trying to do is use a net send to warn me of an error, but I can't seem to get the SendKeys method to send either a Windows Key or a Ctrl & Esc at the same time. This means I can't get at the run prompt.

    Therefore option 2 is to open an MS DOS window and then use SendKeys to send the string and the enter key to send me the message.

    Will also need to know how to shut the prompt window down afterwards, if you can also let me know.

    Thanks in advance!!

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Try to use the SHELL command to run your DOS order....

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you could also get the app to send an email, store details of the error in a table

  4. #4
    Join Date
    Feb 2005
    Location
    England.
    Posts
    232
    I thought about an E-mail but then I also thought about how long it could take for me to look at Outlook to see the error. A net send is immediate and can always been seen, so long as I am at my desk.

    As to writing to the table, I already do this to trap the error so I know what the issue was, but again without constant monitoring I could miss this.

    I'll have a look at the 'Shell' comand and see what I can find.

    Thanks guys!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •