The TO clause can only be used with modal Forms and FormSets (Error 1982)

You have attempted to use the DO FORM command with the TO clause:

DO FORM x TO variable.

This operation is illegal on modeless forms and form sets.