Showing Database Network Path???

shewolf

Registered User.
Local time
Today, 13:01
Joined
Dec 3, 2004
Messages
25
I've got a database with several users and we've had two people recently who rather than creating a shortcut to the db on their desktop copied it and then proceeded to enter their data there instead of into the one on the network.

I would like to be able to add a field on the first page they see when they open it with the complete file name / path information. I know how to do it in Word by adding a field to a header or footer. However, I can't seem to figure out how to do it in Access.

My hope is that if I can display the path and then include a dialog box when the database is opened warning users to verify they have the correct version before they enter any information.

Alternatively, is there a script I could write that would have the db check that it's the V drive copy not a C drive copy?

Any and all help will be greatly appreciated. Thank you.

Charis Wilson
Denver, CO
 
CurrentProject.Path will give you the path to the database.
 
as for the check to see if it is in the right place, just have on the first form that loads, check if the path contains "V:/" or whatever you are looking for, and if it does, move on, if it doesn't msgbox "please use the database copy" and then DoCmd.Quit

Code:
Private Sub Form_Load()

If not instr(CurrentProject.Path, "V:") > 0 Then
    MsgBox "Please only use the network copy of this database."
    DoCmd.Quit
End If

End Sub
 
Good idea but some users might not have their computer mapped to the server with the same drive letter. Better to verify if the front end of the db is located @ \\Server\Partition\Directory to avoid that problem.
 

Users who are viewing this thread

Back
Top Bottom