runtime 3219 on linked table

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.
 
G

Graham Mandeno

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top