Enable or disable the menu bar in forms
SET MENUBAR ON | OFF | (<expL>)
When the MENUBAR is set ON, it enables use of the [MENU] key from within forms to activate user-defined menus. If MENUBAR is set OFF, the [MENU] is disabled from inside forms for activating user-defined menus. This is particularly useful when using the same form for APPEND and EDIT operations. The default setting for MENUBAR is ON.
if menuitem()="APPEND" set menubar off append else set menubar on edit endif