H
Herman
Guest
In a table (tblMnthNr) there are 3 indexes, the third named 'MonthNr'.
There are at least two fields in the table: MnthNr and Days
Every time VBA reports that rs.Index is not available for this type object (error 3251). The construction is (with MndSel as String for the Seek):
Dim IndexNaam As String
Dim strCntD as String
Dim rs As Recordset
Dim db As Database
Set db = CurrentDb
Set rs = db.OpenRecordset("tblMnthNr")
IndexNaam = "MonthNr"
rs.Index = IndexNaam <= here stops the run.
rs.Seek "=", MndSel
strCntD = rs!Days
How can I VBA let handle it in the right way?
There are at least two fields in the table: MnthNr and Days
Every time VBA reports that rs.Index is not available for this type object (error 3251). The construction is (with MndSel as String for the Seek):
Dim IndexNaam As String
Dim strCntD as String
Dim rs As Recordset
Dim db As Database
Set db = CurrentDb
Set rs = db.OpenRecordset("tblMnthNr")
IndexNaam = "MonthNr"
rs.Index = IndexNaam <= here stops the run.
rs.Seek "=", MndSel
strCntD = rs!Days
How can I VBA let handle it in the right way?