John W. Colby
jwcolby at colbyconsulting.com
Fri Mar 19 07:19:52 CST 2004
I don't reference it at all, the zip / unzip code just uses the dll. It's
all magic to me.
The code for a form that uses it with a button that zips a file (hard coded
filename):
Option Compare Database
Option Explicit
'Create a variable to hold the zip class
Dim fclsZip As dclsZip
Private Sub Form_Close()
'cleanup the pointer to the class
Set fclsZip = Nothing
End Sub
Private Sub Form_Open(Cancel As Integer)
'setup a pointer to the class
Set fclsZip = New dclsZip
End Sub
Private Sub cmdZipTheFile_Click()
On Error GoTo Err_cmdZipTheFile_Click
fclsZip.ZipFile = CurrentProject.Path & "\" &
"TextZipDemoCtlClassV2.Zip"
fclsZip.AddFileSpec CurrentProject.Path & "\" & "DemoCtlClassV2.mdb"
fclsZip.Zip
Exit_cmdZipTheFile_Click:
Exit Sub
Err_cmdZipTheFile_Click:
MsgBox Err.Description, , "Error in Sub
Form_frmDemoZip.cmdZipTheFile_Click"
Resume Exit_cmdZipTheFile_Click
Resume 0 '.FOR TROUBLESHOOTING
End Sub
That code works. If you fail to specify the "ZipFile" or the "AddFileSpec"
the application page faults. There is NO error handling or checking of any
kind inside the zip code. 8-(
John W. Colby
www.ColbyConsulting.com
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Robert Gracie
Sent: Friday, March 19, 2004 7:18 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] zip/unzip
John,
I just can't wait....I need to know....:-)
How did you reference the .dll in Access. Access (A2K) Keeps Telling me it
can't reference it.???
Robert Gracie
www.servicexp.com
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of John W. Colby
Sent: Thursday, March 18, 2004 9:02 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] zip/unzip
OK, I got it working. It was page faulting because I wasn't setting up
required properties before trying the zip, little things like the name of
the zip file, the name of the object to zip etc. Once I set those
properties, it works fine. The zipped file can be read by Winzip. Cool
stuff and will be part of the next framework demo article I'm working on
tonight.
>Ah, that jiggles some demagnetized memory bits!
You my dear friend are OLD it would seem. Are you by any chance referring
to core memory? I actually worked on computers with core memory back in my
Navy days. Massive Sperry Univac 642/B refrigerator sized "mainframes", 36
bit with 32 kwords of core memory and a lightening fast 4 microsecond
instruction time (256 k instructions / second).
John W. Colby
www.ColbyConsulting.com
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of John W. Colby
Sent: Thursday, March 18, 2004 6:29 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] zip/unzip
I put them in System32 and the app page faults and closes Access if I try
and run the zip stuff/
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of John Bartow
Sent: Thursday, March 18, 2004 5:11 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] zip/unzip
Ah, that jiggles some demagnetized memory bits!
I think thats the ticket, John
--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com