Record Buffer Rule 3: A weak-scope block cannot contain any free references to the same buffer.
This rule makes sense for the same reasons as Record Buffer Rule 2. Consider this example:
DEFINE VARIABLE fLimit AS DECIMAL NO-UNDO.
FOR EACH Customer NO-LOCK WHERE Customer.State = "NH"
BY Customer.CreditLimit DESCENDING:
DISPLAY Customer.CustNum Customer.Name Customer.CreditLimit.
fLimit = Customer.CreditLimit.
FIND FIRST Customer NO-LOCK WHERE Customer.CreditLimit > fLimit.
DISPLAY Customer.CustNum Customer.Name Customer.CreditLimit.
END.
While the AVM is processing the FOR EACH block, it gets a request to use the same buffer to find a completely unrelated record. This fails with a similar error, as shown in the following figure.