>>SELECT INTO
CURSOR>>
>>>...The problem is that I'm getting browse windows
>
>are you saying to select as variablename
>into cursor, then do the calculation elsewhere?
No - you must specify the name of the target cursor, or the default name of "Query" is used and it immediately pops the cursor in a browse. Instead, add an INTO CURSOR clause to specify an alias to associate with the result, and the browse won't pop and it won't be instantly destroyed by the next query.
Instead of
SELECT
foo FROM
barSELECT
foo FROM
bar INTO CURSOR baz