VBA Access Mdule equvalant of if exist c:/path/file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am looking for the access vba Function syntax that is equivalent to the
script command

if exist c:\path\file goto result
echo it does not exist
exit
:result
echo it does exist
exit

any answers welcome.

Thanks,
JimBrim
 
JimBrim said:
I am looking for the access vba Function syntax that is equivalent to the
script command

if exist c:\path\file goto result
echo it does not exist
exit
:result
echo it does exist
exit


That's Fairly close. Try this:

If Dir("c:\path\file") <> "" Then
Echo "it does not exist"
Else
Echo "it does exist"
End If

Not sure how you want to display the result, Echo displays
it in the status bar, assuming you have it enabled.
 
Back
Top