Because In-top level form cannot be modal.
You can use another trick:
- set ShowWindow to 0
- set Desktop to .T.
MartinaJ
>Hi Experts,
>
>Got this error:
>
>
The TO clause can only be used with modal Forms and FormSets (Error 1982)>
>My form settings were as follows:
>
>AutoCenter = .T.
>Desktop = .T.
>ShowWindow = 2
>WindowType = 1
>
>I also have code in the Unload event, that RETURNs the value.
>
>My syntax:
>
>DO FORM myModalForm TO myVar
>
>
>This causes the form to appear quickly then proceed on to the Unload event.
>
>When I change ShowWindow to 0 or 1, it will behave as desired. Why? How come?
>
>Thanks again,
>Dennis