[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Using Seek on Linked table...

Posted on 2007-08-06
Medium Priority
Last Modified: 2013-11-05
Access 2003

I'am trying to open a database and then open a recordset that is the linked table....

I'am using the seek method...

I don't think I have my references set correctly....
Do I need a specifc reference for this  ..

' for Linked Table XrefInfo   08/06/2007
Dim dbBE As Database
Dim strBEPath As String
strBEPath = Mid(CurrentDb.TableDefs( _
"tblXrefInfo").Connect, 11)
Set dbBE = OpenDatabse(strBEPath)
' ================================================
Set qd = CurrentDb.QueryDefs("qryBruteForceResultMfrnum")
Set dbs = CurrentDb
Set rsCust = CurrentDb.OpenRecordset("tblMfrnumDescMatch")
Set rsMfrnum = CurrentDb.OpenRecordset("tblXrefInfo", dbOpenTable) ' Xref Information

Question by:Fordraiders
  • 2
  • 2
LVL 32

Accepted Solution

jadedata earned 2000 total points
ID: 19641520
Seek can only be used on a dbOpenTable type recordset

Set the contianing datbase as an object and try from there

set db = dbengine(0).opendatabase("c:\foldername\databasename.mdb",dblanggeneral)
set tbl = db.openrecordset("tablename",dbopentable)
LVL 32

Expert Comment

ID: 19641532
don't forget to set your index for use also...
LVL 75
ID: 19641933
From the Help File - you cannot use Seek on a  Linked Table

"You can't use the Seek method on a linked table because you can't open linked tables as table-type Recordset objects. However, if you use the OpenDatabase method to directly open an installable ISAM (non-ODBC) database, you can use Seek on tables in that database."

LVL 75
ID: 19641941
Sorry ... hit Submit by accident.

Clarification .... You can open tables (not linked) in an external database and then use Seek.


Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question