[AccessD] A Matter of Killing

Max Wanadoo max.wanadoo at gmail.com
Sun Aug 16 09:52:04 CDT 2009


Not necessary to test for file size or do a DIR() or any of the other
cumbersome ways.

Simple code is always best.

1. Kill it.
2, If it isn't there, trap the error and move on.
3. If it is there, it gets killed. 
4. Either way we move on.

Simple, elegant, efficient and within the design parameters of MS Access.
Oh, and easily understood with subsequent reading without the need to write
explanatory notes.

IMO of course.

Max


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mike Mattys
Sent: 16 August 2009 15:31
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