I want to merge the condition results 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...
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
**Want to get something like this**
If int(Inventory) <> 0 Then
If Apple = "" And Banana = "" Then
strSQL = strSQL & " AND ((myApple = 0 AND myBanana = 0) 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 AND myBanana <> 0)"
End If
End If
myApple myBanana
0 0
0 0
0 5
1 0
6 0
0 0
continue.....