Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    function to create zipped database (Access 2000)

    I have a function that creates a database. Is there any way to make the function create the database in a zipped form?TThe function i have is:


    Function CreateDepotDB(tName As String, StrPassword As String)
    '*******************************************
    Dim wsp As Workspace, db As Database
    Dim db2 As Database
    Set db = CurrentDb
    Set wsp = DBEngine.Workspaces(0)
    Set db2 = wsp.CreateDatabase(tName, dbLangGeneral & ";pwd=" & StrPassword)
    db2.Close
    End Function

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: function to create zipped database (Access 2000)

    We use Dynazip for that purpose in our applications. There isn't anything built into VBA directly for this.
    Charlotte

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: function to create zipped database (Access 200

    You can also download a free command line add-on for winzip, from http://www.winzip.com

    You can then zip files in code with a command like:

    RetVal = Shell("c:Program filesWinzipwzzip -P " & strzipfileName & " " & strdbName)
    Regards
    John



Posting Permissions

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