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

Linked xls (datasource) moved - get old path name

Status
Not open for further replies.

jojones

Programmer
Dec 4, 2000
104
AU
Hi

I have a database which has several linked tables, some to other dbs and some to excel workbooks. Some of the tables will no longer open because the source workbooks have been moved or deleted. The error that I get is that the Microsoft Jet database engine could not find the object 'GL_Postings'. In this case GL_Postings is the name of a worksheet within a workbook.

I need to get the name of the workbook, and also the path if possible. I cannot get into the design view of the table.

I have tried:

Sub GetPath()
MsgBox CurrentDb.TableDefs("tblAccruedIncomeAdjustments").SourceTableName
End Sub

but it just returns the same 'GL_Postings'

Please help me.
THANKS LOADS!
Jo
 
I have just tried

Sub IAmGoingMad()
MsgBox CurrentDb.TableDefs("tblAccruedIncomeAdjustments").Connect
End Sub

and it has returned the path of the file. Sorry if I distracted you from something important. :)
 
ACTUALLY.... If anyone can give me some code which captures the path & file name as a string I can use that would be great.

Ideally I could use some code that goes through ALL tables in my db and returns the path & file names.

thanks thanks thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top