I have a query to get value on an open form (A/R Credit Memo). I want to get the A/R invoice number that was credited. This is the query I have created using Query Generator SELECT T0.DocNum FROM OINV T0 , ORIN T1 WHERE T1.DocNum =$[$8.0.0]. However, the query is always returning a zero. Is there anything wrong with the variables?