5 Replies Latest reply: May 15, 2014 10:03 AM by joey RSS

    Scripting in MDP: Opening An MS Access File

    BenDC _

      Does anyone know how I can open an MS Access file (ACCDB or ACCDR) using MDP? I was able to start an instance of another program (like MS Access or Monarch) but it just runs in the background (which you can only see when you open Task Manager). I need to run an MS Access (ACCDR) file from MDP and need it to stay open (either in front or behind the MDP console).

       

      Thanks!

        • Scripting in MDP: Opening An MS Access File
          joey

          MDP runs in the background.  You can't use it to make applications display in front of the user (at least as far as I know). 

           

          You can execute a macro in Access from a batch file that MDP calls.

           

          Can you provide more details about what you're trying to do?

            • Scripting in MDP: Opening An MS Access File
              BenDC _

              Whenever I call an application such as Monarch or an Access file I can see that it opens, but only if I view the Task Manager. I want the file to actually open whether it is minimized in the taskbar or in normal view.

               

              You know I thought about calling a batch file from MDP and then executing Access that way.

               

              Thanks for your thoughts.

               

              MDP runs in the background.  You can't use it to make applications display in front of the user (at least as far as I know). 

               

              You can execute a macro in Access from a batch file that MDP calls.

               

              Can you provide more details about what you're trying to do?[/QUOTE]

                • Scripting in MDP: Opening An MS Access File
                  joey

                  Could you provide a little more about your business challenge? Why do you want the file to actually open whether it is minimized in the taskbar or in normal view?

                    • Scripting in MDP: Opening An MS Access File
                      BenDC _

                      Sorry for the late response. I guess what I was trying to do was launch an Access database. This Access database then calls on several instances of Monarch Pro to print targeted pages converted to a PDF file. For example: When Access opens, it will call Monarch Pro and then print pages 1-10 as 001.pdf. It will also print pages 2-20 as 002.pdf, pages 3-30 as 003.pdf, and so on and so forth.

                       

                      I found it hard to code in MDP to print targeted pages of a report and then convert it in PDF. I found it a lot easier to code in Access to call Monarch Pro and then change the default printer to a PDF Writer and print targeted pages.

                       

                      Any thoughts?

                       

                      Could you provide a little more about your business challenge? Why do you want the file to actually open whether it is minimized in the taskbar or in normal view?[/QUOTE]

                        • Scripting in MDP: Opening An MS Access File
                          joey

                          So you're actually not using Data Pump, but rather VBA code to interact with Monarch and do a controlled print based on your specifications?

                           

                          As a quick side note, I believe that Monarch V10 may be able to do this as one export. Just some food for thought.

                           

                          If you have the Access module working, why not just have a batch script that calls the access module or macro?  Data Pump would not need to be involved.  You could call the script from the windows scheduler.