Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Export database tables (2003)

    Hi,

    I have the attached code to export tables which are in the same mdb file as the code resides in.

    What I would like to achieve however is that I can pass an mdb file name as a parameter and have the code export all tables in THAT file to a new database.

    The reason is that I want to create a backup copy of a backend database with just tables.

    Is this possible?
    Attached Files Attached Files
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Export database tables (2003)

    You'd have to start a second instance of Access through Automation. See the attached version of the code.

    Call it like this:

    Dim strRet As String
    strRet = ExportTables("C:TestMydatabase.mdb", False)
    Attached Files Attached Files

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Export database tables (2003)

    Thanks Hans.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

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