Recordset Object Error with Linked Table 
Author Message
 Recordset Object Error with Linked Table


I need help on the following :

When I used this code :

Dim dbCurrent As Database
Dim tdBill As Tabledef
Dim rsBill As Recordset
Dim stBillNo As string

Set dbcurrent = CurrentDB()
Set tdBill = dbCurrent.Tabledefs("Bills")
set rsBill = tdBill.OpenRecordset (dbOpentable)
rsBill.index = "PrimaryKey"
rsBill.Seek "=", stBillNo

This works fine if I have a non-linked table.  And I like to use "Seek"
as I think it is fast to get the record I want.

Now, when I use database splitter to split the database into two
databases with data and applications on seperate database.  The above
code gave me run-time error "Invalid Operation"  And after reading the
Access Help File, I found that Access will not let you use Table-Type
recordset with linked tables.

This mean that I have to change the recordset "rsBill" to other type
(dynaset or snapshot) and this means I cannot use seek.  When I use
Dynaset type, and use the command

rsBill.Findfirst "BillNo Like '" & stBillNo & "'"

Access took more time to return me the record

I'm sure there must be a way to implement alternative codes which is
faster (but I'm just don't know yet).  Can you help me find a way to
solve this problem?



Mon, 11 Feb 2002 03:00:00 GMT  
 Recordset Object Error with Linked Table
The only workaround for this problem is that you open the database directly:

set db=Opendatabase ("back_end.mdb")

In this way, you can use the dbOpenTable option and the Seek method.

Alberto Borbolla
Microsoft VB MVP
Tecnologia en Sistemas Mexico

Mon, 11 Feb 2002 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Changing the linked table path without the linked table manager

2. Open Recordset where SQL contains linked table

3. Recordset from linked tables...

4. Recordset/Linked Table problem

5. Opening a recordset in a linked table from Excel

6. Powerpoint object linking to Access table data

7. error VBA and Linked Tables because of split

8. Run-time error '3011' linking table

9. Strange ODBC errors using DAO to access linked tables

10. Error 64508 When Using Linked Tables

11. Linked FoxPro table: Error 3078 when app installed

12. 32bit Crystal Reports error reporting links in 3 table database


Powered by phpBB® Forum Software