How do I unzip a file from VBA

J

JH

Folks,

I have an application that, using VBA, checks for the current version of the
frontend.mdb on a wide area network. If a new version of the front end is
found, the application copies the frontend.mdb from the server to the local
disk and then imports the changed objects to the users local copy of
frontend.mdb.

This all works well, but the frontend.mdb is getting a bit big and would be
better saved on the server as a zipped file.

So my question is, I can copy the zipped file to the C drive using vba, but
how do I then unzip it to get to the frontend.mdb it contains using VBA so
that I can then import the updated forsm etc into the current users copy of
the front end?

Any clues would be gratefully received!

John
 
W

Wayne Morgan

To unzip the file, you need a command line zip utility and use the Shell
function or a zip dll file. There may be an easier option. If you are just
wanting to compress the file on the server, place the file in a compressed
folder, one using NTFS compression. The file will be stored in the reduced
size but will expand automatically when needed. To compress the folders
contents, right click the folder in Explorer, choose Properties, click the
Advanced button, and check the Compress... checkbox (WinXP). If I'm
remembering correctly, with earlier NT versions, the compression option was
on the first tab, you didn't have to click the Advanced button.
 
J

JH

Wayne,

Thanks for this. I have gone for the command line and shell option.

The compressed folder idea didn't seem to help much, I did a test of times
to download the various files, both the uncompressed mdb and the comrpessed
folder version took around 80 seconds. The zip file took 15 seconds.

John
 
W

Wayne Morgan

You're correct, if you were just wanting to save space on the server, the
compressed folder would work, but it won't save any download time because
the server would decompress the file before sending it.
 
T

Tony Toews

JH said:
Folks,

I have an application that, using VBA, checks for the current version of the
frontend.mdb on a wide area network. If a new version of the front end is
found, the application copies the frontend.mdb from the server to the local
disk and then imports the changed objects to the users local copy of
frontend.mdb.

Interesting. I'd just replace the users local copy of the FE MDB.
And make it an MDE at the same time so they can't muck with forms or
reports.

If they have their own queries or reports then give each person an MDB
linked to the MDB on the server which they can use.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top