I want to merge the condition result of my 2 If statements. First if statement result shows only both 0 result, in second if statement result one of them has to be bigger than 0... Want I want to do is Leave second condition as it is and modify first if statament like my code...
If (Inventory) <> 0 Then
If Apple = "" And Banana = "" Then
strSQL = strSQL & " AND (myApple = 0 AND myBanana = 0)"
End If
End If
If int(Inventory) <> -1 Then
If Apple = "" And Banana = "" Then
strSQL = strSQL & " AND (myApple <> 0 OR myBanana <> 0)"
End If
End If
Here is a small table showing what my two conditions lead to: What I want to get
Inventory | Desired result
-----------+---------------
-1 | show both zero or at least one not be zero (Show all)
0 | at least one must not be zero |