troubleshooting Question

How to use dao seek method on table w/no indexes

Avatar of Juan Velasquez
Juan VelasquezFlag for United States of America asked on
Microsoft Access
11 Comments1 Solution359 ViewsLast Modified:

I'm currently working on creating a bill of materials.  However, the tables that I am working on have no indexes.  I am trying to understand the dao index and seek methods.  In particuluar how to apply them to tables with no defined primary keys.  When referring to the example below, is the last line attempting to assign a new index named PrimaryKey to the recordset index collection or is it referring to a preexisting primary key.  

Set dbCur = CurrentDb()
  Set rstParts = dbCur.OpenRecordset("tblPartMaster", dbOpenTable)
  rstParts.Index = "PrimaryKey
Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros