I have a table with 3 indexes (index1, index2, index3). I want to use each index for specific logic. So for each logic I try to set the index with following code, it fails at rs1.index = "index name". I get an error 3251. Please advise as how can use a specific index for my code.
'Option Compare Database
'
'Dim Db As DAO.Database
'
'Dim rs1 As DAO.Recordset ' for requirement table
'
'Dim cnt As Integer
'cnt = 1
'
'Dim dd As String
'Set Db = CurrentDb()
'
'Set rs1 = Db.OpenRecordset("T_InvReq_A_010_InvMoves", dbOpenDynaset) ' Inv moves transactions
''rs1.Index = "Index3"
'With rs1
' .MoveLast
' .MoveFirst
'Option Compare Database
'
'Dim Db As DAO.Database
'
'Dim rs1 As DAO.Recordset ' for requirement table
'
'Dim cnt As Integer
'cnt = 1
'
'Dim dd As String
'Set Db = CurrentDb()
'
'Set rs1 = Db.OpenRecordset("T_InvReq_A_010_InvMoves", dbOpenDynaset) ' Inv moves transactions
''rs1.Index = "Index3"
'With rs1
' .MoveLast
' .MoveFirst