I may not be understanding what you are asking, but to try to answer your
question:
If you want to open any file, you will have to know the entire path. That
path can be a default path (just a predefined folder) or it could be just any
folder.
From the way you describe how the document is being processed and saved, I'm
afraid you will have to know the folder and the filename that you want to
retrieve.
If I understand correctly, you will have the file name in a field on your
form. If this is true, then all you need is the folder and you could then
concatenate the path and the file name together to get the entire path.
Many times this type if thing is something that can be coordinated between
you and the persons who are actually saving the files. Just come up with a
specific folder where all relative files are to be stored. Then, if you have
the file name in your form, it is simple to check to be sure the file is
there and if so, open it.

Signature
HTH
Mr B
> If it was a Word Document would I still have enter the entire path?
>
[quoted text clipped - 36 lines]
> > >
> > > Thanks in anticipation
Gary B - 14 Mar 2007 14:21 GMT
Thanks.
Yes the file name is in a field on the Form and the files are being saved to
a specific folder.
Can you let me know the best way to concatenate the path and the file name
together to get the entire path.
Thanks again
G
> I may not be understanding what you are asking, but to try to answer your
> question:
[quoted text clipped - 57 lines]
> > > >
> > > > Thanks in anticipation
Mr B - 14 Mar 2007 14:36 GMT
Gary,
If the file name is in a textbox on your form, you can first define a string
type variable and then assign the path and file name to the string variable
like this:
dim strFulPathAndName as string
strFulPathAndName = "C:\Temp\" & me.NameOfYourTextbox
In the line above, you would replace the "C:\Temp\" with the actual path to
the folder where the files are being stored.
Then you can use the string type variable that will now hold the complete
path and the file name in your code to open the file.

Signature
HTH
Mr B
> Thanks.
>
[quoted text clipped - 68 lines]
> > > > >
> > > > > Thanks in anticipation
Gary B - 14 Mar 2007 17:13 GMT
Mr B,
Put the code in as suggested but file didn't open:
dim strFulPathAndName as string
strFulPathAndName = "G:\Division\Wholesale Forecast\Load Plans\" &
me.LoadPlanNumber
Is ther anything obvious I have done wrong?
Gary
> Gary,
>
[quoted text clipped - 84 lines]
> > > > > >
> > > > > > Thanks in anticipation
Mr B - 14 Mar 2007 18:21 GMT
Gary,
It may not be so obvious. I was assuming that you already had code that
would actually open the file and only need to know how to put the path and
filename together. Sorry about that.
Once you have the path and filename in the variable you can try to use
something like the code below to open the file. I may depend on the file
type you are trying to open. At any rate, uou can give it a try and see if
you can make it work.
Application.FollowHyperlink strFulPathAndName
This worked here to open a PDF type document. If the document type is
registered with Windows then it should work.

Signature
HTH
Mr B
draccess at askdoctoraccess.com
> Mr B,
>
[quoted text clipped - 97 lines]
> > > > > > >
> > > > > > > Thanks in anticipation
Gary B - 15 Mar 2007 13:24 GMT
Done the trick
Thanks
Gary
> Gary,
>
[quoted text clipped - 113 lines]
> > > > > > > >
> > > > > > > > Thanks in anticipation