Creates, runs, and closes a form object that you specify. When a
form is run modally, no input (keyboard or mouse click) can occur
except to objects on the modal form. If, at design time, you know
the specific form that you want to run, use this function or the
RUN Function
(Form). If you do not know the specific form that you
want to run, you can use the FORM.RUNMODAL Function
(Form) or the FORM.RUN Function
(Form).
|
[Action :=] Form.RUNMODAL
|
Parameters
- Form
-
Type: Variable
After you define this variable, you can run the following form
functions:
-
SETTABLEVIEW
-
SETRECORD
-
GETRECORD
-
RUN
-
RUNMODAL
Unlike the Form.RUN function, the variable is not automatically
cleared after this function runs.
If the form you specify does not exist, a compilation error
occurs.
Property Value/Return Value
Type: Code
Specifies what action the user took. The return value is
optional. The following table shows the possible return values.
Return value |
Description |
OK
|
The user selected OK to exit the window
|
Cancel
|
The user selected Cancel to exit the window
|
LookupOK
|
The user selected OK on a lookup window
|
LookupCancel
|
The user selected Cancel on a lookup window
|
Yes
|
The user selected Yes
|
No
|
The user selected No
|
Close
|
The user selected Close, ESC, or closed the window
using the title bar
|
FormHelp
|
The user selected Help
|
RunObject
|
The user selected an option that ran another object
|
RunSystem
|
The user selected an option that ran an external program
|
Remarks
Example
This example shows how to use the RUNMODAL function.
Assume that the variable Form1 has been defined as Form 1.
|
Copy Code |
CLEAR(Form1);
Form1.XXX; // any user-defined function
Form1.SETTABLEVIEW(MyRecord);
Form1.SETRECORD(MyRecord);
IF Form1.RUNMODAL = Action::LookupOK THEN Form1.GETRECORD(MyRecord)...
|
This code example includes the CLEAR
Function to verify that the variable has been
cleared.
See Also