Aggregates (AVG, MIN, MAX, COUNT, TOTAL) can only be performed on fields that are associated with tables (not on DISPLAYONLY fields), and the tables must be listed in the opening command of the same control block. Revise the form specification, and recompile.