RE:URGENTE NECESITO MANUAL ADO
I hope this function help you.
Pedro Perfeito
Porto-Portugal
'-------------------------------------------------------------------
'VERIFICA SE DETERMINADO CAMPO E CHAVE
'-------------------------------------------------------------------
Function eChave(Tabela As ADOX.Table, nomeCampo As String) As Boolean
On Error GoTo TrataErro
Dim idx As ADOX.Index
Dim col As ADOX.Column
eChave = False
For Each idx In Tabela.Indexes
If idx.PrimaryKey Then
For Each col In idx.Columns
If col.Name = nomeCampo Then
eChave = True
End If
Next col
End If
Next idx
Exit Function
'Rotina de erro
TrataErro:
Exit Function
End Function