1 Reply Latest reply: May 15, 2014 9:54 AM by Nick Osdale-Popa RSS

    JetExportTable to Access 2002

    Bryan Smith

      I have an Access 2002 application that gets data from a Monarch model.  When the user is ready to retrieve the data, I have created some VB code to open the correct Monarch files and execute the JetExportTable property to export to a table in the current Access application (MDB file).


      However, I receive the following error in the log file:  "Cannot open file. File may be locked or in use by another application."  Well, no kidding, I have the MDB open in order to execute the VB.  I have the MDB set to shared and multiple users can access the MDB at one time using Access.


      Any ideas on how to correct (in either Access, VB or Monarch)?



        • JetExportTable to Access 2002
          Nick Osdale-Popa

          Yes, Monarch needs exclusive rights to the .MDB file, so no you can't use code to export to the current Access file.  What I have done is export the tables/summaries to a temporary .MDB file and then use code to import the tables from that .MDB into the current database.