Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I go around the error? 1

Status
Not open for further replies.

Sylvialn

IS-IT--Management
Dec 28, 2000
101
US
I received this error: Operation is not supported for this type of object. (Error 3251)

Here's what I'm trying to do:

I have a linked table in one of our dBs. I have a report that prints info about our customers and uses the linked table to pull info out of. But, when I push the command button to print the report I get that error and when I hit debug it takes me to where I have set the recordset. Here's what I have:

Set rstEmpinfo = dbs.OpenRecordset("EmployeeInfo")
rstEmpinfo.Index = &quot;EmployeeID&quot; <-----HERE'S WHERE THE ERROR OCCURS

Thank you Terry for your information on OpenRecordset and the linked table.

I now understand that the OpenRecordset does not work on a linked table. But, how can I get around this...how can I use the linked table b/c I need it's info????

Thanks!!!
 
I have purchased Lotus Notes Reporter 2.0 and am trying to use it to link a Lotus Notes Database to Microsoft Access 97 or 2000 database. Any suggestions?
 
Hey Sylvialn,

I open recordsets based on linked tables.. All my tables are linked..


JOhn
 
Guys and Gals,

You can't use the Index / Seek methods on linked tables.

The way you get around this is to either

(1) Come up with a better strategy to obtain your data.
(SELECT * FROM EMPLOYEES WHERE EmployeeName = 'blah')

(2) Open the database that contains that table and then use the same method...

ie.

dim ws as dao.workspace
dim db as dao.database
dim rs as dao.recordset
dim dbpath as string

dbpath = mid(dbengine(0)(0).TableDefs(&quot;Names&quot;).Connect,11 )
'ugly cludge
set ws = dbengine(0)
set db= ws.opendatabase(dbpath)
set rs = db.openrecordset(&quot;blah&quot;)
rs.index = &quot;Blah's index&quot;


hope that helps
 
Thanks you guys!!!!!

Does anyone know how to use the seek method with linked tables?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top