D DZ Dec 27, 2007 #1 Is there a way to return the name of the field(s) that are the Primary key? Access 97 Thank you
D DZ Dec 27, 2007 #2 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
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 Dec 27, 2007 #3 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.
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.