BPM- ChangeApproveSwitch Must Enter Valid G/L

I am working on a pre-processing BPM that makes sure the G/L account field at the release level is not blank when the PO is approved. I am using the action: 'number of rows in the specified query is not less than 1, and the query reads like this:

for each ttPOHeader no-lock where (ttPOHeader.approve = FALSE), each PORel no-lock where (PORel.Company = ttPOHeader.Company and POrel.PONum= ttPOHeader.PONum) and PORel.TranType = "PUR-UKN", for each PORel, each ttPORelTGLC no-lock where (ttPORelTGLC.company = POREl.company and ttPORelTGLC.PONum = PORel.PONum and ttPORelTGLC.POLine = PORel.POLine and ttPORelTGLC.PORelNum = PORel.PORelNum) and ttPORelTGLC.GLAccount = "" no-lock

When I run the code through PORel.TranType = "PUR-UKN", the query will pop up with the error message I specified as the action, but when I add the rest of the code the PO approves successfully when it is not supposed to. Does anyone know what is wrong with the second half of my code? Thanks for the assistance.