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

  • Thread starter Thread starter Wilsoch
  • Start date Start date
W

Wilsoch

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.

Is anyone willing to help me with this?
 
I think more details are in order.

Are you looking to let the user find the file, or are you wanting to have
Access search the entire hard drive for the file?

Is it strictly a case of if the file's there, continue, or does Access need
to use the file somehow?
 
If Dir(CurrentProject.path & "\YourSecurityFime.Ext") = vbNullString Then
'-- You can not find the "SecurityFile" in the same
'-- directory as the mdb/mde file.
MsgBox "Sorry...No Security File available. Exiting to Windows.", vbOKOnly
DoCmd.Quit
End If

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.

Is anyone willing to help me with this?

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
Wilsoch said:
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
 
Back
Top