[AccessD] A Matter of Killing

Mike Mattys mmattys at rochester.rr.com
Sun Aug 16 10:24:11 CDT 2009


Hi Max,

I agree. There are plenty of ways to accomplish whatever
you're programming and using errors to your advantage
is just plain creative. It all depends upon what you're doing ...

Private Function FileExists(ByVal inFile As String) As Boolean
    On Error Resume Next
    FileExists = CBool(FileLen(inFile) + 1)
End Function

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


> 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




More information about the AccessD mailing list