If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
Hi there, im using VB6 with Data Access Objects connecting to an Access 2000 database.
I would like to find what the index\primary key is from the database using the DAO, but cannot find a method or property with the RecordSet object to do so.
For i = 0 To CurrentDb.TableDefs('mytable').Indexes.Count - 1
Debug.Print CurrentDb.TableDefs('mytable').Indexes(i).Name & " : "; CurrentDb.TableDefs('mytable').Indexes(i).Primary
Next
if you use VB, you have to call DAO... it has the same property, there are few samples in DAO help...