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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Seek is not working on index field....puzzled

Status
Not open for further replies.

Pack10

Programmer
Feb 3, 2010
495
US
I have a table where I indexed one of the fields. Now I want to use a SEEK command on it, but I am getting an error. The field "Parent" is set as an index (Dupes OK) in the table structure.

Set rst = db.Openrecordset("Task_Information",dbOpentable)
rst.Index = "Parent" ' the field that has the index

 
Did you actually check the name of the index vs the name of the field? Parent is a property in Access so I would change the name of the index to "ParentNDX" and then change the code.


Duane
Hook'D on Access
MS Access MVP
 
Is "Parent" also the name of the index?

When you reference an index you must use the name of the index and that is not necessarily the same as the name of a field or fields that are included in the index.

What error are you seeing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top