Arvin Meyer [MVP] replied to T2B
04-Feb-10 06:27 PM
If you want something quick & dirty, I just cobbled this together:
Function GetIndexes()
' Arvin Meyer 2/4/2010
On Error Resume Next
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim idx As DAO.index
Set db = CurrentDb
For Each tdf In db.TableDefs
If Left(tdf.Name, 4) <> "Msys" Then
For Each idx In tdf.Indexes
Debug.Print tdf.Name, idx.Name
Next
End If
Next
Exit_Here:
Set db = Nothing
Set tdf = Nothing
Set idx = Nothing
End Function
If you want something more sophisticated, I wrote a dozen years ago that
adds them to a table.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com