(Q) Can I perform Seek and Index on linked tables?
(A) Directly, No. But you can use the following function which
will allow you to do this.
(watch out for line wraps. It's just a single line of code.)
Public Function OpenForSeek(TableName As String) As Recordset
Set OpenForSeek = DBEngine.Workspaces(0).OpenDatabase _
(Mid(CurrentDb().TableDefs(TableName).Connect, _
11), False, False, "").OpenRecordset(TableName, _
dbOpenTable)
End Function
Just use:
Dim rst as Recordset
set rst=OpenForSeek("TableName")
and you can use rst.Seek and rst.Index on linked table TableName.
|