
97 - Referencing Linked Data
To open a table-type recordset, you need to open your database
variable against the database where the linked table resides. You can
get the path to that database from the connect property of the linked
table in the front-end database where your code is running. Something
like this:
dim tdf as tabledef
dim dbsTest as database
dim rstAppointments as recordset
dim strPath as string
set dbsTest =currentdb
set tdf=dbsTest.tabledefs("Appointments")
strPath=mid(tdf.connect, 11)
set dbsTest =opendatabase(strPath)
set rstAppointments = dbsTest.OpenRecordset("Appointments", _
dbOpenTable)
-- Andy
Quote:
>Could someone please explain how to modify the following line so it will
>work when I split the database?
>Set rstAppointments = dbsTest.OpenRecordset("Appointments", dbOpenTable)
>Thanks,
>Troy