Predmet:Re: zabraniti unos količine manji od 0
Na formi Box na tasteru dalje stavi ovaj kod:
PreuzmiIzvorni kôd (Visual Basic):Private Sub Command7_Click()
Dim KolSum As Single
Dim proizvod As String
Dim Ulaz As Single
proizvod = Forms![kasa]![detalji].Form![proizvod]
KolSum = DLookup("suma", "QSUMA", "Proizvod='" & proizvod & "'")
Ulaz = Me.Ulaz
If Ulaz > KolSum Then
MsgBox "Ima samo:" & KolSum
Me.Ulaz = KolSum
Me.Ulaz.SetFocus
GoTo Kraj
End If
If Me.Ulaz <> "" Then
strOdg = Me.Ulaz
DoCmd.Close
End If
Kraj:
End Sub
Podrška samo putem foruma, jer samo tako i ostali imaju koristi od toga.