| 
       CREATE QUERY handle
        IN WIDGET-POOL widget-pool-name | 
| 
       /* r-crtqry.p */
        DEFINE VARIABLE hQuery AS HANDLE NO-UNDO. DEFINE VARIABLE iNumVar AS INTEGER NO-UNDO INITIAL 10. CREATE QUERY hQuery. hQuery:SET-BUFFERS(BUFFER Customer:HANDLE). hQuery:QUERY-PREPARE("FOR EACH Customer WHERE Customer.CustNum < " + STRING(iNumVar)). hQuery:QUERY-OPEN. REPEAT WITH FRAME y: hQuery:GET-NEXT(). IF hQuery:QUERY-OFF-END THEN LEAVE. DISPLAY Customer.CustNum Customer.Name FORMAT "x(30)" Customer.City FORMAT "X(20)". END. hQuery:QUERY-CLOSE(). DELETE OBJECT hQuery. | 
 CREATE-QUERY must be followed by the QUERY-PREPARE( ) and QUERY-OPEN() methods before the query can be run.
CREATE-QUERY must be followed by the QUERY-PREPARE( ) and QUERY-OPEN() methods before the query can be run.