Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

zip a database for email 3

Status
Not open for further replies.

punky

Programmer
Mar 21, 2001
29
US
I need to be able to create a button that will zip a
database so the user can email it. Only zipped
databases can be emailed from our systems. I need
the code that will accomplish this zipping for an access
database.
 
Try this code on a button in your form, then check to see if the file was created...


Dim strAppName As String
Dim strDbFile As String, strZipFile As String

'WinZip 8.0 by WinZip Computing, Inc. is used here...

strAppName = "C:\Program Files\WinZip\WINZIP32.EXE"

'Add soft or hard coded paths to file variables if needed...

strZipFile = "drive:\path\database.zip"
strDbFile = "drive:\path\database.mdb"

Call Shell(strAppName & " -a " & strZipFile & " " & _
strDbFile, 1)

MsgBox "Your database " & strDbFile & " was zipped as " & _
strZipFile & " and is ready for emailing!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top