runtime 3219 on linked table

  • Thread starter Thread starter Pete
  • Start date Start date
P

Pete

I split by .MDB into front-end Back-end and am now getting a runtime
3219 error assocated with the ".index" line in the following code:

dim glbroster as dao.recordset
Set glbRoster = CurrentDb.OpenRecordset("Roster")
glbRoster.Index = "MbrNumberKey"
glbRoster.MoveFirst

I went to the backup copy of the app, prior to the split, and the code
works just fine. After the split and with not other changes, the error
occcurs.

Any Ideas are appreciated.
 
Hi Pete

Local tables are opened by default as table recordsets, but linked tables
are treated like queries and can be opened only as dynasets or snapshots.

The Index property and the Seek method are valid only for table recordsets -
hence the error.

Seek can always be replaced by FindFirst.

If you are using Index here to order the recordset by a key other than the
primary key, then change your OpenRecordset argument to:
"Select * from Roster order by MbrNumberKey"
 
Back
Top