Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Prompter Form must have a default property.
  • Prompter Form must contain some mechanism for returning a Modalresult(ok) when closed successfully (usually done through an OK button).

How to create the sample

  • Create a form called EMPNOPRMT. Paste the prompter code from below.
  • Open EMPNO field in the component editor and paste Field source from below.
  • Create a form and copy the form code from below. Compile and run.

...

Note

Notes:

  • In the OK button click handler the following line is used to inform the calling field that the prompter is being closed successfully and that a new value has been chosen.

    Set      Set Com(#com_owner) Modalresult(ok)

    If the above line was not present, the calling field would presume the prompter form was cancelled and was not successful so would not try to retrieve a new value for the field.

  • After adding a prompter form to a field by adding a *Prompter class in the field source you still do not automatically get the ellipses for the prompter when you use the field on a form. To make the ellipses visible set the ShowPrompter property of the field to TRUE.