NYG,
Can you pull out the raw data from the OpenPO table on the
Item col for the record you want? Perhaps by altering query2:
<cfquery name="qryName2" datasource="dbName">
select pGr, netPrice, Item
from OpenPO
where purchDoc = '#qryName1.PONumber#'
</cfquery>
I realize this might bring back several records but it could
be helpful to see what the DB has versus what you're comparing.
In addition, what happens if you adjust the query2 where
clause to use a like for the itemNo)?
where (purchDoc = '#qryName1.PONumber#' and Item like
'%#TRIM(qryName1.itemNo)#')
Also, more out of curiosity, does anything change if you
alter query1 to change the name of the alias for ItemNo:
<cfquery name="qryName1" datasource="dbName">
select
PONumber,
rtrim(itemNo) as itemNum
from table1
where documentNo = '#form.documentNumber#'
</cfquery>
More curious than anything on that last one!