qwkslvr1999
Registered User.
- Local time
- Today, 14:17
- Joined
- Jan 21, 2002
- Messages
- 42
I have the following that shows me which record I am curently viewing out of total records.
Dim Myrst As Recordset
Me.CurRec= Me.CurrentRecord
Set Myrst= CurrentDb.OpenRecordset("SELECT field1, field2 FROM tbl1 WHERE tbl1.field1='" & Forms!frminfo!field1 & "'")
Myrst.MoveLast
Me.totalrec = Myrst.RecordCount
Myrst.Close
Everything works fine for the first record. When I go to the next record, it gives me either of the errors: "No current record" or "You can't go to the specified record."
Any idea why? Thanks in advance.
Dim Myrst As Recordset
Me.CurRec= Me.CurrentRecord
Set Myrst= CurrentDb.OpenRecordset("SELECT field1, field2 FROM tbl1 WHERE tbl1.field1='" & Forms!frminfo!field1 & "'")
Myrst.MoveLast
Me.totalrec = Myrst.RecordCount
Myrst.Close
Everything works fine for the first record. When I go to the next record, it gives me either of the errors: "No current record" or "You can't go to the specified record."
Any idea why? Thanks in advance.