Y
youssef
I did a simple code on a form that generate a message when the user enter
quantity return more than the quantity sold
the problem is that the code work correctly with some record but doesn't
work correctly with other record (the message apear if the user enter a
quantity less or more the the quantity return) and that happened when the
quantity is 10
which mean that this isn't an error in the code
the code on a button:
Private Sub Command8_Click()
Dim msg, stryle, title, response
msg = "the quantity return could not be more than the quantity sold"
title = "caution"
Style = 0
Me.Text9 = Me.List2.Column(3)
If Me.Text6 > Me.List2.Column(3) Then
response = MsgBox(msg, Style, title)
Else
DoCmd.Beep
End If
End Sub
which the fourth column in list2 is quantity
quantity return more than the quantity sold
the problem is that the code work correctly with some record but doesn't
work correctly with other record (the message apear if the user enter a
quantity less or more the the quantity return) and that happened when the
quantity is 10
which mean that this isn't an error in the code
the code on a button:
Private Sub Command8_Click()
Dim msg, stryle, title, response
msg = "the quantity return could not be more than the quantity sold"
title = "caution"
Style = 0
Me.Text9 = Me.List2.Column(3)
If Me.Text6 > Me.List2.Column(3) Then
response = MsgBox(msg, Style, title)
Else
DoCmd.Beep
End If
End Sub
which the fourth column in list2 is quantity