Leopard011
New member
- Local time
- Yesterday, 18:03
- Joined
- Jan 14, 2012
- Messages
- 9
Dear All,
I have a simple equation to check if the materials in warehouse are sufficient for use as required or not
I wrote a label to alert the user if there is no sufficient amount for use
So, if the required material has sufficient amount , I need the alert to be invisible
The problem is, when I enter quantity more than available in warehouse, the label is shown as required.
After I modify the amount and decrease it, the label is not going to be hidden
My code is as follows:
Private Sub M_Q_AfterUpdate()
x = Me.M_Quantity.Value
y = Me.M_Available.Value
If y < x Then
Me.Label29.Visible = True
Else
Me.Label29.Visible = False
End If
End Sub
I don't know where is the error although its very simple if statement
I have a simple equation to check if the materials in warehouse are sufficient for use as required or not
I wrote a label to alert the user if there is no sufficient amount for use
So, if the required material has sufficient amount , I need the alert to be invisible
The problem is, when I enter quantity more than available in warehouse, the label is shown as required.
After I modify the amount and decrease it, the label is not going to be hidden
My code is as follows:
Private Sub M_Q_AfterUpdate()
x = Me.M_Quantity.Value
y = Me.M_Available.Value
If y < x Then
Me.Label29.Visible = True
Else
Me.Label29.Visible = False
End If
End Sub
I don't know where is the error although its very simple if statement
