Here's a solution:
1. The Table that is used as the RecordSource property of the form "
frmMIBEntry" is named "
TblMIBEntry" in this example (you did not mention the actual name).
2. The table "
TblMIBEntry" has an Autonumber column "
SysCounter" that is used to determine the most recent record.
3. The name of the people in the combobox "
cboAssignedTo" is in the first column of the combo (column 0).
4. This function (in the form module) will return the next person in the list:
Code:
Private Function GetNextAssigned()
Dim strLastAssigned As String
Dim i As Long
strLastAssigned = DLookup("AssignedTo", "TblMIBEntry", "SysCounter=" & DMax("SysCounter", "TblMIBEntry"))
For i = 0 To Me.cboAssignedTo.ListCount - 1
If Me.cboAssignedTo.Column(0, i) = strLastAssigned Then Exit For
Next i
If i = Me.cboAssignedTo.ListCount Then
'
' Error: The name was not found in the list of the combo.
'
ElseIf i = Me.cboAssignedTo.ListCount - 1 Then
GetNextAssigned = Me.cboAssignedTo.Column(0, 0)
Else
GetNextAssigned = Me.cboAssignedTo.Column(0, i + 1)
End If
End Function