[AccessD] Using WinZip With Access Again.

paul.hartland at fsmail.net paul.hartland at fsmail.net
Tue Apr 20 09:50:25 CDT 2004


Thanks for the fast response Gustav, still getting same problem though.  Text files exporting but no WinZip file to be seen, and no error message...






Message date : Apr 20 2004, 03:37 PM
>From : "Gustav Brock" 
To : "Access Developers discussion and problem solving" 
Copy to : 
Subject : Re: [AccessD] Using WinZip With Access Again.
Hi paul

First, use Format() for creating strings from dates!

Second, you probably need quotes around your file names as some of
them contains spaces.

Use Debug.Print:

strQuote = Chr(34)
strCommand =
strQuote & "C:\Program Files\Winzip\Wzzip.exe" & strQuote & " " &
strQuote & wzFinal & strQuote & " " &
strQuote & strShiftData & strQuote & " " &
strQuote & strDownTime & strQuote
Debug.Print strCommand
wzFiles = Shell(strCommand, 0)

Remove line breaks above!

/gustav


> Thanks for all your help with my last WinZip question, however now I need to know where I am going wrong. I have the following code in my application:

> Dim strShiftData As String
> Dim strDownTime As String
> Dim wzFinal As String
> Dim wzFiles

> strShiftData = "C:\Shifts_" & Replace(DATE, "/", "") & "_" & Replace(Time(), ":", "") & ".txt"
> strDownTime = "C:\Down_" & Replace(DATE, "/", "") & "_" & Replace(Time(), ":", "") & ".txt"

> DoCmd.TransferText acExportDelim, , "qryNewExportShiftDataToText", strShiftData, True
> DoCmd.TransferText acExportDelim, , "qryNewExportDownTimeToText", strDownTime, True

> wzFinal = "C:\Branston" & Replace(DATE, "/", "") & Replace(Time(), ":", "")

> wzFiles = Shell("C:\Program Files\Winzip\Wzzip.exe " & wzFinal & " " & strShiftData & " " & strDownTime, 0)

> MsgBox “Finshed Export”,,”**** User Message – Export Complete ****”

> However I can’t seem to see any zip file on my C: drive, and I get no error message. Can someone please see where I am going wrong here. I have WinZip 9.0 and the Command Line Interface installed.

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
Join the UK's number one for the internet 
www.freeserve.com/time


More information about the AccessD mailing list