BOF and EOF problems
Posted on 2006-11-30
My research has failed, so here goes!
Why does this stop movement to the previous form when I am currently not on the first record? I am right now on record 7, and when I click on Previous button, it exits the sub. If I put Not before the rst.BOF, then it moves until I get to the first one, then another click gives an error message.
Private Sub ToPrevious_Click()
On Error GoTo Err_ToPrevious_Click
blnEditsOK = False
If SaveMyRecord() = True Then
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("AQ00SubjectEligEnroll")
If rst.BOF Then
DoCmd.GoToRecord , , acPrevious
MsgBox "This is the first record.", vbOKOnly, "First Record"