Private Sub cboEmployee1_AfterUpdate()
Me.StaffValue1 = Me.cboEmployee1
If Me.cboEmployee1 = Me.StaffValue2 Or Me.StaffValue3 Or Me.StaffValue4 Or Me.StaffValue5 Or Me.StaffValue6 Or Me.StaffValue7 Or Me.StaffValue8 Or Me.StaffValue9 Or Me.StaffValue10 Then
Me.StaffValue1 = Null
Me.cboEmployee1 = Null
MsgBox "You all ready have assigned this name for allocation.", vbCritical + vbOKOnly + vbDefaultButton2, "Repeated Information"
DoCmd.CancelEvent
Me.cboEmployee1.SetFocus
Exit Sub
End If
End Sub
Private Sub cboEmployee2_AfterUpdate()
Me.StaffValue2 = Me.cboEmployee2
If Me.cboEmployee2 = Me.StaffValue1 Or Me.StaffValue3 Or Me.StaffValue4 Or Me.StaffValue5 Or Me.StaffValue6 Or Me.StaffValue7 Or Me.StaffValue8 Or Me.StaffValue9 Or Me.StaffValue10 Then
Me.StaffValue2 = Null
Me.cboEmployee2 = Null
MsgBox "You all ready have assigned this name for allocation.", vbCritical + vbOKOnly + vbDefaultButton2, "Repeated Information"
DoCmd.CancelEvent
Me.cboEmployee2.SetFocus
Exit Sub
End If
End Sub
Private Sub cboEmployee3_AfterUpdate()
Me.StaffValue3 = Me.cboEmployee3
If Me.cboEmployee3 = Me.StaffValue1 Or Me.StaffValue2 Or Me.StaffValue4 Or Me.StaffValue5 Or Me.StaffValue6 Or Me.StaffValue7 Or Me.StaffValue8 Or Me.StaffValue9 Or Me.StaffValue10 Then
Me.StaffValue3 = Null
Me.cboEmployee3 = Null
MsgBox "You all ready have assigned this name for allocation.", vbCritical + vbOKOnly + vbDefaultButton2, "Repeated Information"
DoCmd.CancelEvent
Me.cboEmployee3.SetFocus
Exit Sub
End If
End Sub
Private Sub cboEmployee4_AfterUpdate()
Me.StaffValue4 = Me.cboEmployee4
If Me.cboEmployee4 = Me.StaffValue1 Or Me.StaffValue2 Or Me.StaffValue3 Or Me.StaffValue5 Or Me.StaffValue6 Or Me.StaffValue7 Or Me.StaffValue8 Or Me.StaffValue9 Or Me.StaffValue10 Then
Me.StaffValue4 = Null
Me.cboEmployee4 = Null
MsgBox "You all ready have assigned this name for allocation.", vbCritical + vbOKOnly + vbDefaultButton2, "Repeated Information"
DoCmd.CancelEvent
Me.cboEmployee4.SetFocus
Exit Sub
End If
End Sub
Private Sub cboEmployee5_AfterUpdate()
Me.StaffValue5 = Me.cboEmployee5
If Me.cboEmployee5 = Me.StaffValue1 Or Me.StaffValue2 Or Me.StaffValue3 Or Me.StaffValue4 Or Me.StaffValue6 Or Me.StaffValue7 Or Me.StaffValue8 Or Me.StaffValue9 Or Me.StaffValue10 Then
Me.StaffValue5 = Null
Me.cboEmployee5 = Null
MsgBox "You all ready have assigned this name for allocation.", vbCritical + vbOKOnly + vbDefaultButton2, "Repeated Information"
DoCmd.CancelEvent
Me.cboEmployee5.SetFocus
Exit Sub
End If
End Sub
Private Sub cboEmployee6_AfterUpdate()
Me.StaffValue6 = Me.cboEmployee6
If Me.cboEmployee6 = Me.StaffValue1 Or Me.StaffValue2 Or Me.StaffValue3 Or Me.StaffValue4 Or Me.StaffValue5 Or Me.StaffValue7 Or Me.StaffValue8 Or Me.StaffValue9 Or Me.StaffValue10 Then
Me.StaffValue6 = Null
Me.cboEmployee6 = Null
MsgBox "You all ready have assigned this name for allocation.", vbCritical + vbOKOnly + vbDefaultButton2, "Repeated Information"
DoCmd.CancelEvent
Me.cboEmployee6.SetFocus
Exit Sub
End If
End Sub
Private Sub cboEmployee7_AfterUpdate()
Me.StaffValue7 = Me.cboEmployee7
If Me.cboEmployee7 = Me.StaffValue1 Or Me.StaffValue2 Or Me.StaffValue3 Or Me.StaffValue4 Or Me.StaffValue5 Or Me.StaffValue6 Or Me.StaffValue8 Or Me.StaffValue9 Or Me.StaffValue10 Then
Me.StaffValue7 = Null
Me.cboEmployee7 = Null
MsgBox "You all ready have assigned this name for allocation.", vbCritical + vbOKOnly + vbDefaultButton2, "Repeated Information"
DoCmd.CancelEvent
Me.cboEmployee7.SetFocus
Exit Sub
End If
End Sub
Private Sub cboEmployee8_AfterUpdate()
Me.StaffValue8 = Me.cboEmployee8
If Me.cboEmployee8 = Me.StaffValue1 Or Me.StaffValue2 Or Me.StaffValue3 Or Me.StaffValue4 Or Me.StaffValue5 Or Me.StaffValue6 Or Me.StaffValue7 Or Me.StaffValue9 Or Me.StaffValue10 Then
Me.StaffValue8 = Null
Me.cboEmployee8 = Null
MsgBox "You all ready have assigned this name for allocation.", vbCritical + vbOKOnly + vbDefaultButton2, "Repeated Information"
DoCmd.CancelEvent
Me.cboEmployee8.SetFocus
Exit Sub
End If
End Sub
Private Sub cboEmployee9_AfterUpdate()
Me.StaffValue9 = Me.cboEmployee9
If Me.cboEmployee9 = Me.StaffValue1 Or Me.StaffValue2 Or Me.StaffValue3 Or Me.StaffValue4 Or Me.StaffValue5 Or Me.StaffValue6 Or Me.StaffValue7 Or Me.StaffValue8 Or Me.StaffValue10 Then
Me.StaffValue9 = Null
Me.cboEmployee9 = Null
MsgBox "You all ready have assigned this name for allocation.", vbCritical + vbOKOnly + vbDefaultButton2, "Repeated Information"
DoCmd.CancelEvent
Me.cboEmployee9.SetFocus
Exit Sub
End If
End Sub
Private Sub cboEmployee10_AfterUpdate()
Me.StaffValue10 = Me.cboEmployee10
If Me.cboEmployee10 = Me.StaffValue1 Or Me.StaffValue2 Or Me.StaffValue3 Or Me.StaffValue4 Or Me.StaffValue5 Or Me.StaffValue6 Or Me.StaffValue7 Or Me.StaffValue8 Or Me.StaffValue9 Then
Me.StaffValue10 = Null
Me.cboEmployee10 = Null
MsgBox "You all ready have assigned this name for allocation.", vbCritical + vbOKOnly + vbDefaultButton2, "Repeated Information"
DoCmd.CancelEvent
Me.cboEmployee10.SetFocus
Exit Sub
End If
End Sub
|