I believe you may have problems with the OS putting up errors about there
being no disk -- the code that was posted works around that problem....
--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies
Windows International Division
This posting is provided "AS IS" with
no warranties, and confers no rights.
"B. Austin" <baustin2NOSPAM@aol.com> wrote in message
news:e2iqg0t3psahoje4k8r7r4pchbh05por38@4ax.com...[color=blue]
> I missed the first part of this thread, but doesn't the following function[/color]
do what is required?[color=blue]
>
> Function udfFileExists(varFileName As Variant) As Boolean
>
> On Error GoTo Err_udfFileExists
>
> Open varFileName For Input As #1
>
> Close #1
>
> udfFileExists = True
>
> udfFileExists_Exit:
>
> Exit Function
>
> Err_udfFileExists:
>
> Beep
>
> Select Case Err
> Case 53, 68, 75, 76
> MsgBox "FILE '" & varFileName & "' NOT FOUND.", vbCritical
> Case 71
> MsgBox "DEVICE IS NOT READY.", vbCritical
> Case Else
> MsgBox _
> "AN ERROR OCCURRED." & vbCrLf & vbCrLf & _
> "Error Number: " & Err.Number & vbCrLf & vbCrLf & _
> "Description: " & Err.Description, vbCritical
> End Select
>
> udfFileExists = False
>
> Resume udfFileExists_Exit
>
> End Function
>
>
> On 1 Aug 2004 12:17:38 -0700,
jafortun@oakland.edu (James Fortune) wrote:
>[color=green]
> >"Wayne Morgan" <comprev_gothroughthenewsgroup@hotmail.com> wrote in[/color][/color]
message news:<RKgOc.451$ID7.278@newssvr24.news.prodigy.com >...[color=blue][color=green][color=darkred]
> >> Yes, Microsoft has. See if this helps. It is for VB but should be able[/color][/color][/color]
to be[color=blue][color=green][color=darkred]
> >> ported to Access with a couple of minor changes (namely the control[/color][/color][/color]
array on[color=blue][color=green][color=darkred]
> >> the form).
> >>
> >>
http://vbnet.mvps.org/index.html?cod...loppyready.htm
> >>
> >> --
> >> Wayne Morgan
> >> MS Access MVP[/color]
> >
> >It's nice to know that there's at least one way to use API functions
> >to do it. Given the claim that MicroSoft's FileSystemObject is not
> >totally reliable, I'll have to decide whether to create my own dll,
> >use Randy Birch's solution, or cook up my own API solution in case I
> >need to distribute it. Again, has anyone created their own dll that
> >gets around the limitations of the FileSystemObject?
> >
> >James A. Fortune[/color]
>
> (Remove NOSPAM to reply.)[/color]