Verify if network connected

R

rbeach

I need to add programming to verify the the front end was copied to the local
computer and not allow the front end to be run from the network drive. Please
let me know how to verify the file is run locally before opening the
"MainMenu" form. If it is run locally I have a form that should open named
"Network" which is just a notification thay are running from the network and
must copy the file to their local machine before opening. Once they click
"OK" it will close the database. If it is on the local machine, it will open
the "MainMenu" form.
 
D

Dale Fye

Rick,

I use the same concept for my applications, as well as a FrontEnd Updater
similar to the one Tony Toews describes on his site:
http://www.granite.ab.ca/accsmstr.htm

Use CurrentProject.path to determine the path that the application resides
in. If it starts out with a local drive (C:, ...) then you are local. If
not, popup your form and shut them down.
 
R

rbeach

I have an updater for the front end in place. Thanks for the advice.

Please let me know the programming for the "if" statement utilizing the
CurrentProject.path statement. I am new with programming and the below does
not work properly:

If CurrentProject.Path = "c:*" Then
DoCmd.OpenForm "MainMenu", acNormal
Else
DoCmd.OpenForm "Network", acNormal
End If

Thanks in advance,

Rick
 
R

rbeach

I have replaced the below statement with the below:

If Left(CurrentProject.Path, 1) = "C" Then

This works great.
I appreciate all your assistance.
 
D

Dale Fye

happy to help.

----
HTH
Dale



rbeach said:
I have replaced the below statement with the below:

If Left(CurrentProject.Path, 1) = "C" Then

This works great.
I appreciate all your assistance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top