[AccessD] A Matter of Killing

Rocky Smolin rockysmolin at bchacc.com
Sun Aug 16 10:19:47 CDT 2009


Now I've got a problem with the KILL statement which works in the mdb but
not in the mde.  I think I need a reinstall of Office.  

But I did find out that if you try to do a:

Set objXLBook = objXLApp.Workbooks.Add
objXLBook.SaveAs gstrBackEndPath &
Forms!frmBFGExportBOM!txtAssemblyPartNumber & " - BOM Export.XLS"

And the file's already there, Excel produces a nice message telling you that
the file's already there, do you want to overwrite it?

So I can actually comment out the KILL and let Access and Excel take care of
business.

Rocky


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mike Mattys
Sent: Sunday, August 16, 2009 7:31 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] A Matter of Killing

Hi Rocky,

Try this: (Aircode)

Dim FileSize As Long
FileSize = FileLen(gstrBackEndPath &
Forms!frmBFGExportBOM!txtAssemblyPartNumber & " -  BOM") If FileSize>0 Then
    Kill gstrBackEndPath & Forms!frmBFGExportBOM!txtAssemblyPartNumber & " -
BOM"
End If

-
Michael R Mattys
MapPoint and Database Dev
www.mattysconsulting.com
-
----- Original Message ----- 
From: "Susan Harkins" <ssharkins at gmail.com>
To: "Access Developers discussion and problem solving" 
<accessd at databaseadvisors.com>
Sent: Sunday, August 16, 2009 10:19 AM
Subject: Re: [AccessD] A Matter of Killing


> Not as far as I'm concerned. I think, if you can route out the error 
> another
> way, you should, but this quick fix is acceptable, especially if the
> alternative is lengthy. I use it occasionally.
>
> Susan H.
>
>
>> Is there anything wrong with the simple workaround:
>>
>> On Error Resume Next
>> Kill gstrBackEndPath & Forms!frmBFGExportBOM!txtAssemblyPartNumber & " -
>> BOM
>> Export.XLS"
>> On Error GoTo 0
>
> -- 
> 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




More information about the AccessD mailing list