I have "limit" control on the mainform and "currentremainedsubform" subform that have a source is "currentremainedquantity" query.
On current event: I added below codes:
Private Sub Form_Current()
If Forms!products!currentremainedSubform.Form!Remaine d > Me.limit Then
With Me.ALERT
.Visible = False
End With
Else
With Me.ALERT
.Visible = True
End With
End If
End Sub
So as to find out wich product that have the quantity on hand which already came to limit.
Abobe code works fine except that if there is a product that does not value in the "remained" control, microsoft access returned this message:
"run time error '2427'
You entered an expression that has no value".
could any one improve my code to clear above error message?
I'm newbie to access so I'm felling hard to work with it.
many thanks.
On current event: I added below codes:
Private Sub Form_Current()
If Forms!products!currentremainedSubform.Form!Remaine d > Me.limit Then
With Me.ALERT
.Visible = False
End With
Else
With Me.ALERT
.Visible = True
End With
End If
End Sub
So as to find out wich product that have the quantity on hand which already came to limit.
Abobe code works fine except that if there is a product that does not value in the "remained" control, microsoft access returned this message:
"run time error '2427'
You entered an expression that has no value".
could any one improve my code to clear above error message?
I'm newbie to access so I'm felling hard to work with it.
many thanks.
