Private Sub Kolicina_Exit(Cancel As Integer) Dim Kolicina As Single Dim Maks As Single Maks = [Forms]![Forma1]![Forma2].[Form]![Broj] Kolicina = Me.Kolicina.OldValue If Kolicina > Maks Then Call MsgBox("Toliko nema na stanju. ",vbOKOnly + vbApplicationModal + vbDefaultButton1,"Napomena") SendKeys "{ESC}", True SendKeys "{ESC}", True End If End Sub