Skip to main content

Indicex/index

I got a script to create an index, but IDEA don't set the index, the default is no index, is there a way to force IDEA to use a specific index?
 
 
Function IndexDatabase(DatabaseToBeOpened As String, FieldToBeIndexed As String, IndexKey As String)
Set db = Client.OpenDatabase(DatabaseToBeOpened)
Set task = db.Index
task.AddKey FieldToBeIndexed, IndexKey
task.Index FALSE
Client.CloseDatabase(DatabaseToBeOpened)
Set task = Nothing
Set db = Nothing
End Function