Re: Non-programmer needs code to find file on user's hard drive

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Wilsoch wrote:

>Long story short: My Access developer is letting me down. He doesn't
>really know VB and he can't figure out how to do what I need.
>
>Situation:
>Access database that will be used locally on individual user's
>machines.
>
>What I need:
>I need code to make Access look for a "security" file located on the
>user's hard drive. If it finds the file, it allows the user to continue
>into the application. If it doesn't find the file, the database shuts
>down and does not let the user proceed.
>
>I'm begging and pleading for help from all of you experts. I am not a
>VB programmer, and I'm not so ignorant as to think I could teach myself
>how to do this in the short time I have before I need to release this.


This should be the essence of checking for the existence of
a file:

If Dir("c:\path\file") = "" Then
Application.Quit
End If

--
Marsh
MVP [MS Access]
.



Relevant Pages