There's a combo box control named PartNumberID. If the length is greater than 3 the number is too long. I am using the NotInList event. If the number entered is not listed the first thing I want to do is make sure no more than 3 chartacers have been entered. I've tried:
If Len(Me.PartNumberID) > 3 then
Msgbox "The part number is too long.", vbOKOnly
Me.PartNumberID.SetFocus
Exit Sub
End If
Start Free Trial