Primary Key info

D

DZ

Is there a way to return the name of the field(s) that are the Primary key?
Access 97

Thank you
 
D

DZ

Is there a way to return the name of the field(s) that are the Primary key?
Access 97

and / or if a particular field is part of primary key

Thank you
 
A

Allen Browne

Take a look at the DescribeIndexField() function towardss the end of this
page:
http://allenbrowne.com/AppRelReportCode.html

The function shows how to loop through the Indexes collection of the
TableDef. If the Primary property is True, list the Fields of the Index.

The code is is part of a utility for Access 2000 and later, but the function
should work in A97 if you remove the Private keyword.
 
Top