Open Back End Folder

T

Tom Ventouris

The Back End is held in a folder which conitains subfolders for each RecordId.

I have tried to set up Application.FollowHyperlink that opens each RecordID
subfolder from the FE. I cannot use Current.Project Path because the path to
the BE is different for each user. I have set up my function with
CurrentDb.TableDefs("myTable").Connect but this returns a path with the BE
name and extension included.

Is there a way to get around this - to return only the path to the BE
without the file name?
 
H

hasek.josef

Tom Ventouris said:
The Back End is held in a folder which conitains subfolders for each
RecordId.

I have tried to set up Application.FollowHyperlink that opens each
RecordID
subfolder from the FE. I cannot use Current.Project Path because the path
to
the BE is different for each user. I have set up my function with
CurrentDb.TableDefs("myTable").Connect but this returns a path with the BE
name and extension included.

Is there a way to get around this - to return only the path to the BE
without the file name?
 
H

hasek.josef

Tom Ventouris said:
The Back End is held in a folder which conitains subfolders for each
RecordId.

I have tried to set up Application.FollowHyperlink that opens each
RecordID
subfolder from the FE. I cannot use Current.Project Path because the path
to
the BE is different for each user. I have set up my function with
CurrentDb.TableDefs("myTable").Connect but this returns a path with the BE
name and extension included.

Is there a way to get around this - to return only the path to the BE
without the file name?
 
L

Larry Daugherty

I'm mystified - not the first time ...

What kind of architecture are you using that you could use a hyperlink
to retrieve am individual record?

.... that has every user going to a different BE? If each user has a
private BE then why wouldn't it be on their own desktop or user area?

If it's Access and if you can tell us your issue so that we understand
it then we can help you get from where you are to where you want to
be.

HTH
 
D

Douglas J. Steele

Left(Mid(CurrentDb.TableDefs("myTable").Connect,11),
Len(Mid(CurrentDb.TableDefs("myTable").Connect,11)) -
Len(Dir(Mid(CurrentDb.TableDefs("myTable").Connect,11))))

If you have a full path to a file in FullPath, you can get the path only as

Left(FullPath, Len(FullPath) - Len(Dir(FullPath)))

The reason for the Mid(CurrentDb.TableDefs("myTable").Connect, 11) is to
remove the ;Database= from the beginning of the Connect string.
 
T

Tom Ventouris

Thanks for the repsonse.

I have a split Access 2007 application, Front End and Back End.

I am using the hyperlink to open a folder which contains each Record's
subfolder where external documents are stored. The hyperlink is
Application.FollowHyperlink ..."path" &"RecordID". I am looking to return the
"path" and join it with the RecordID for the hyperlink to follow.

Every user uses the same BE, it is the path from the user's desktop to the
BE that varies, (they are on different networks with different paths to the
file server)
 
J

John W. Vinson

Every user uses the same BE, it is the path from the user's desktop to the
BE that varies, (they are on different networks with different paths to the
file server)

Store the actual, unambiguous, unvarying \\server\path\filename syntax rather
than trusting mapped drive letters.
 
L

Larry Daugherty

Thanks John.

Obviously it's long past time for me to get back into the books and
see what's been going on over the past few generations of Access.
 
T

Tom Ventouris

Thank you. This does all I need.

Douglas J. Steele said:
Left(Mid(CurrentDb.TableDefs("myTable").Connect,11),
Len(Mid(CurrentDb.TableDefs("myTable").Connect,11)) -
Len(Dir(Mid(CurrentDb.TableDefs("myTable").Connect,11))))

If you have a full path to a file in FullPath, you can get the path only as

Left(FullPath, Len(FullPath) - Len(Dir(FullPath)))

The reason for the Mid(CurrentDb.TableDefs("myTable").Connect, 11) is to
remove the ;Database= from the beginning of the Connect string.
 
T

Tom Ventouris

Thanks. This would have worked with some maintenace if changes were ever made
to the paths. I have used the suggetion from Mr Steele which will look for
the path on its own.
 
P

Paul Shapiro

You can extract the path to the BE from the Connect property of any of your
linked tables in the FE:
strDataMDBPath = CurrentDb.TableDefs(strLinkedTableName).Connect
If strDataMDBPath = "" Then 'Local data
strDataMDBPath = CurrentDb.Name
Else
'Remove the leading ";DATABASE="
strDataMDBPath = Right$(strDataMDBPath, Len(strDataMDBPath) - 10)
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top