Code:
Option Compare Database
Option Explicit
Private msaved As Boolean
Private Sub Combo309_BeforeUpdate(cancel As Integer)
If Combo309.Value = "HR" Then
Call GetCount("HR")
If hrcount = 10 Then
MsgBox "you have already reached the limit, choose another department or will be assigned"
cancel = True
Leave a comment: