Need to locate files on network share

G_Loc

Unregistered
Local time
Today, 07:38
Joined
May 26, 2006
Messages
24
I built a database that allows users to pull PDF versions of contracts through it, but one thing that I see becoming a problem is that the links to the PDF files refer to a mapped network drive and some users may have a different drive letter assigned to the network share that the files are on.

The way it works is that there is one person scanned documents and putting them on the network then she goes into the database, inputs the data for that document into the database and sets the path of PDF thats on the network.

So, is there a way to make it so that when she sets the location to the file that instead of Access using the mapped drive letter that it retrieves the exact network path of the file?
 
Last edited:
Thanks!

It works, but I'm having trouble getting it to work the way I want it to.

I'm passing it the location of a file a user selects using a browse dialog box and it converts the share drive letter to UNC just fine, I just can't figure out how to pass the UNC name back to another function where I could add the file path to the UNC and throw it all into a table. It gives me an error saying that "the sub of function is not defined."

I put the code into its own module as doing it any other way would throw errors everywhere.

How can I pass a variable between functions? Or rather, between a module and a function outside of the module??
 
Alright, I got it to work... kinda

When I get the path, it leaves a bunch of trailing spaces. I got rid of them using 'Trim' and tried to add the path and file name onto that.

I end up with this in debug mode: "\\bkcfil01\common\DatabaseTest\official presentation - final.ppt" When I try to output it to a messagebox I only get "\\bkcfil01\common"

The '' character is messing everything up! I can't seem to find a way to get rid of it!
 
Ok, I got it completely... I set up a counter for the characters in the path, subtracted 1, did a Left$ using the length and it cut out the little block then I added the rest of the info and thats it!
 

Users who are viewing this thread

Back
Top Bottom