I cannot define the Null situation in my code. I need the condition when the quantity in the
field stock is Null.But i cannot do it.I can do it only with <=1 but then it means that
the presence of 1 piece is not taken into account.
If i write
If CLng(DCount("stock", "Products", StrCondition)) = Null Then
Or
If CLng(DCount("stock", "Products", StrCondition)) = 0 Then
Then the code does not function and no message box appears.
If i write
If CLng(DCount("stock", "Products", StrCondition)) < 1 Then
Then the same happens again.
My code works only when i put the following condition:
If CLng(DCount("stock", "Products", StrCondition)) <= 1 Then
MsgBox "Not on stock" ", vbInformation + vbOKOnly
However, if i write <= 1, then if there is 1 piece on stock, the mesage says i have
nothing on stock and the programme stops.
How can i avoid this difficulty ?