Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identify Server Name - Access Database Paths

Status
Not open for further replies.

Dave177

Programmer
Jan 9, 2005
165
0
0
GB
Hello,

I work in an organisation that has a shared drive that users from three different locations can access. However in one site the shared drive is "P:" and in another it is "S:" (as it appears in Windows Explorer) although it is the same structure in every other way. My Access database sits on this server. In another folder on the same server I have stored pictures, the paths of which are stored in a table in my database. Obviously depending where you are the paths would either begin with a P: or an S:. Is there a way that the database can identify the name of its server so then I can concatenate this onto the beginning of the paths and users can view pictures?

Thanks for any help.

David

 
Try typing the location of the path instead of using mapped drives. The P: asn S: Drives I take it depeneding on the user point to the same locations? These are your mapped drive letters. Instead try using the file location

EG:
\\Server\User\Shared

Either that or set up a logon script on your server that points all users to the same location using the same Drive letter.

EG:
P: on all users points to \\Server\User\Shared

Hope this helps,
Bill
 
What is the value of CurrentDb.Name ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV,

Thanks for this.
CurrentDb.Name does give the letter of the drive.
So presumably I could have a field with the folder names for the pictures and create an expression such as
(left(Currentdb.Name,2)) and stick this onto the beginning of the folder path?
(Just checking as am quite new to this)
Thanks

David
 
you should be able to link to the UNC file path.
To test this you could create a blank form and add an image pointing to a server share (not DFS)

I have a form showing \\brs-fs02\Global\untitled.bmp and have had no problems
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top