I've got an Access 2k database with a linked table connected to an Excel spreadsheet. Unfortunately the name of the Excel file changes daily (the name includes the date). Is there a programmatic way to update the path of a linked table? I'd like to avoid forcing my users to run the Linked Table Manager every day.
I’ve tried (without success):
CurrentDb.TableDefs("ImportData").Properties("connect").Value = "Excel 5.0;HDR=YES;IMEX=2;DATABASE=" & strFileName
and
CurrentDb.TableDefs("ImportData").Connect = "Excel 5.0;HDR=YES;IMEX=2;DATABASE=" & strFileName
Any help would be appreciated.
I’ve tried (without success):
CurrentDb.TableDefs("ImportData").Properties("connect").Value = "Excel 5.0;HDR=YES;IMEX=2;DATABASE=" & strFileName
and
CurrentDb.TableDefs("ImportData").Connect = "Excel 5.0;HDR=YES;IMEX=2;DATABASE=" & strFileName
Any help would be appreciated.
Last edited: