> When I run it from
> the menu system I get an error:  "Illegal command in Entry/Exit
> Procedure".  It seems the error is coming from the use of the Disconnect
> command in the routine.  How can I fix this problem?

You can't disconnect the database, reload, or pack it from inside a form, since
the form relies on the database.

To get around this issue, in your form you need to set a variable to indicate
what should be done, issue a CLOSEWINDOW, then check the variable in the
calling program:

-- Main program
SET VAR vRunCommand TEXT = NULL
EDIT USING MainMenuForm
IF vRunCommand IS NOT NULL THEN
  RUN &vRunCommand
ENDIF

-- In the EEP code for Reload on the form
SET VAR vRunCommand = 'Reload IN AppFile.APX'
CLOSEWINDOW
RETURN

--
Larry

Reply via email to