Private Sub [COLOR=red]NameOfControl[/COLOR]_BeforeUpdate(Cancel As Integer)
If (Me![COLOR=red]NameOfControl[/COLOR]) > 0 And (Me![COLOR=red]NameOfControl[/COLOR]) < 21 Then
' do nothing
Else
MsgBox "Wrong Format, choose numbers between 1-21"
Cancel = True
Me![COLOR=red]NameOfControl[/COLOR].Undo
End If
End Sub