Backend Database
On Sun, 10 May 2009 09:53:00 -0700, Gerry
wrote:
I have put my data tables into another access database which resides on a
server.
After splitting the database. When I use seek, it tells me that it is an
invalid function.
I have linked the tables in the backend database to the current database.
my code is as follows :
Dim dbs1 As dao.Database
Dim rst1 As Recordset
Set dbs1 = CurrentDb
Set rst1 = dbs1.OpenRecordset("Customer Forecast")
rst1.Index = "Key"
rst1.Seek "=", estkey
before splitting the database, it worked fine. Why would this stop working.
The table in the backend database is indexed on "Key"
Thank you,
Gerry
Correct. The SEEK method only works on a *LOCAL* table. You need to either
open a recordset in the backend database, or use the FindFirst method instead.
Seek is a bit more efficient but FindFirst is easier to implement and in most
cases should be just as fast for the user:
rst.FindFirst "[Fieldname] = " & estkey
The name of the index is irrelevant, the FindFirst argument is just a valid
SQL WHERE clause without the word WHERE.
--
John W. Vinson [MVP]
|