Crie um DIM idx as Index para voce poder setar o INDEX da tabela ! Segue um exemplo abaixo, espero que o ajude !!!
Dim dbsNorthwind As Database
Dim tdfEmployees As TableDef
Dim rstEmployees As Recordset
Dim idxLoop As Index
Set dbsNorthwind = OpenDatabase("Northwind.mdb")
Set rstEmployees = _
dbsNorthwind.OpenRecordset("Employees")
Set tdfEmployees = dbsNorthwind.TableDefs!Employees
With rstEmployees
' Enumerate Indexes collection of Employees table.
For Each idxLoop In tdfEmployees.Indexes
.Index = idxLoop.Name
Debug.Print "Index = " & .Index
Debug.Print " EmployeeID - PostalCode - Name"
.MoveMin
' Enumerate Recordset to show the order of records.
Do While Not .EOF
Debug.Print " " & !EmployeeID & " - " & _
!PostalCode & " - " & !MinName & " " & _
!MaxName
.MoveNext
Loop
Next idxLoop
.Close
End With
dbsNorthwind.Close
End Sub
ALEXANDRE COSTA
ARTSOFTSYSTEMS