View Single Post
  #3  
Old April 14th, 2010, 03:15 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default GetOpenFile() and UNC path

"Nick Del Vecchio" wrote in message
...
I'm using the Me.textpic = GetOpenFile() code to search for a picture
in order to put the picture path on a form's text box.

This works fine except that I would like for it to display the UNC
path rather than the drive and directory path. Even if I browse to
the server share and pick the file using My Network places, it still
displays the drive and directory path instead of the UNC path.

Anyone know how I can get the GetOpenFile() to display the UNC path?



There's a Windows API call to convert a mapped-drive path to a UNC path, but
I'm very surprised that you aren't getting the UNC path directly from
GetOpenFile if you browse to the network share rather than the mapped drive.
My own experience and everything I've ever seen posted says that you ought
to get the UNC path if you browse that way. What version of Windows and
Access are you using, and where did you get the GetOpenFile code you're
using?

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)