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
uronmapu > 13-06-12, 08:49 AM
uronmapu > 13-06-12, 11:42 AM
Private Sub gotoPrevious_Click()
On Error GoTo Err_gotoPrevious_Click
With Me.lstItems
.SetFocus
If .ListIndex < .ListCount Then
.ListIndex = .ListIndex - 1
MsgBox "First Contact", , "First Contact"
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
Private Sub gotoNext_Click()
On Error GoTo Err_gotoNext_Click
With Me.lstItems
.SetFocus
If .ListIndex < .ListCount Then
.ListIndex = .ListIndex + 1
MsgBox "End the Contact", , "End the Contact"
End If
End With
Exit_gotoNext_Click:
Exit Sub
Err_gotoNext_Click:
'MsgBox Err.Description
Resume Exit_gotoNext_Click
End Subp
uronmapu > 17-06-12, 11:29 PM
Private Sub gotoNext_Click()
On Error GoTo Err_gotoNext_Click
With Me.lstItems
.SetFocus
If [lstItems].[ListIndex] + 1 < [lstItems].[ListCount] - 1 Then
.ListIndex = .ListIndex + 1
ElseIf [lstItems].[ListIndex] + 1 = [lstItems].[ListCount] - 1 Then
MsgBox "End the Record"
End If
End With
Exit_gotoNext_Click:
Exit Sub
Err_gotoNext_Click:
'MsgBox Err.Description
'MsgBox "End the Record"
Resume Exit_gotoNext_Click
End Sub