Index Property / Seek Method In Recordset
How do you access the table? You must access the table directly not through
table attachment.
For example,
if the table is in a.mdb which is located in c:\temp and you attach the
table through b.mdb, you cannot open it as table through b.mdb. You must
access it directly to a.mdb.
Here is some code to clarify it.
In your program there will be 2 databases object.
Set moOne = CurrentDb ' Where the attached table is defined
Set moTwo = Workspaces(0).OpenDatabase("c:\temp\a.mdb") ' The physical
location of tblA
' Let say that table tblA is on a.mdb
' To open it as a table use
Set moRS = moTwo.OpenRecordset("tblA", dbOpenTable)
' If you open it through moOne, it will be treated as a regular recordset.
Quote:
>I have already used the dbOpenTable option to open the MDB. Why? please
>help!!!
>You must open the recordset as a table using dbOpenTable option. It only
>works with access table.
>I cannot find the Index Property and the seek method in Recordset, why?
>Best Regards,
>Steven