Bobby Heid
bheid at appdevgrp.com
Tue Apr 20 10:03:40 CDT 2004
Using Gustav's code, make sure that you get something out like this in your string: 'C:\Program Files\Winzip\Wzzip.exe' 'C:\Branston0419041100.zip' 'Shiftsxxx' It also looks like your code id not putting a ".zip" on the end of wzfinal. Bobby -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Tuesday, April 20, 2004 10:50 AM To: Access Developers discussion and problem solving Subject: Re: Re: [AccessD] Using WinZip With Access Again. 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 -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com