Finding the primary key using VBA



Hi all,

I need to determine the name of the primary key in a table, but this
must be done using VBA.

I was looking for something like,

for each field in someRecordset.fields
if field.type="primaryKey" then
do something
end if
Next

Does anyone know if a property exists for primary key??

Thanks

Mark

.