uronmapu > 12-06-12, 09:32 PM
Private Sub gotoNext_Click()
On Error GoTo Err_gotoNext_Click
With Me.lstItems
.SetFocus
If .ListIndex < .ListCount Then
.ListIndex = .ListIndex + 1
End If
End With
Exit_gotoNext_Click:
Exit Sub
Err_gotoNext_Click:
'MsgBox Err.Description
'MsgBox "End the Record"
Resume Exit_gotoNext_Click
MsgBox "End the Record"
End Sub
Private Sub gotoPrevious_Click()
On Error GoTo Err_gotoPrevious_Click
With Me.lstItems
.SetFocus
'End If
If .ListIndex < .ListCount Then
.ListIndex = .ListIndex - 1
End If
End With
Exit_gotoPrevious_Click:
Exit Sub
Err_gotoPrevious_Click:
'MsgBox Err.Description
'MsgBox "End the Record"
Resume Exit_gotoPrevious_Click
End Sub