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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linked Table Problem

Status
Not open for further replies.

robcarr

Programmer
May 15, 2002
633
GB
Hi,

I have a database that is split and works fine using this link path.

P:\mydatabase_be.mdb

"P:\" is called "dataprivate$" is there a way to get the linked file to show like this

dataprivate$\mydatabase_be.mdb

the reason I require this is we have 2 networks at our office and the only way for the people on the other network to access the database is to map it and currently there P:\ is used for something else, and I cant change the dataprivate$ letter to something else, so I was think if we used the name instead of the drive letter it should still map and link up okay, as it currently doesnt.

any help greatly appreciated.

Hope this is of use, Rob.[yoda]
 
First of all ... No ... you cannot define a variable path for a linked table.

You could (assuming DAO ... there are ADO equivalents), do something like this when you open your Access application.
Code:
Dim tdf As DAO.TableDef
Dim rs As DAO.Recordset
Set rs = CurrentDb.Openrecordset( _
"Select * From tblLocalPaths " & _
"Where NetWorkID = 'SomeLocalNetworkIdentifier' "

Set tdf = CurrentDb.TableDefs("LinkedTableName")

tbl.Connect = ";DATABASE=" & rs![SourcePath]
tbl.RefreshLink
 
i havent used code I have done a manual way, by recreating the network map within the link tables dialog box, this then created it as dataprivate$, thus not haing to use any code, and seems to work okay, or is so far.

i found the solution on another thread.

thanks for the help though

Hope this is of use, Rob.[yoda]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top