0

Hi all, I am trying to compare output from DB

The code below works on 1 check, but I require to do this on multiple products like so if rowProduct("GRPCODE") <> "Cross Hire" or rowProduct("GRPCODE") <> "Boiler Ancillaries" then etc

but the above line does not work as I have coded it? What is the problem with the code.

Thanks in advance

if rowProduct("GRPCODE")  <> "Cross Hire" then
                                ' Elimination unwanted code
                                if not rowStock.eof then
                                    ' stock found
                                      do while not rowStock.eof
                                        ' loop through stocl
                                        if instr(RemoveItems, "," & rowStock("ITEMNO") & ",") = 0 then
                                            ' item not removed
                                            StockCount = (StockCount + 1)
                                            if rowStock("QTYHIRE") <> "0" then
                                                ' on hire
                                                StockOnHire = (StockOnHire + 1)
                                            end if' end QTYHIRE
                                            if rowStock("QTYALLOC") <> "0" then
                                                ' allocated  
                                                StockAllocate = (StockAllocate + 1)
                                            end if ' end QTYALLOC if
                                        end if
                                        rowStock.movenext
                                      loop ' end do while
                                end if
                            end if
2
Contributors
1
Reply
12
Views
3 Years
Discussion Span
Last Post by MaxMir
0

I think you must insert a check with an "AND" instead of an "OR".
Like this:

if (rowProduct("GRPCODE") <> "Cross Hire" AND rowProduct("GRPCODE") <> "Boiler Ancillaries") then
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.