Informix Error -1140
-1140 NEXT OPTION is a hidden option.
The option that is named in this NEXT OPTION statement has previously been hidden with the HIDE OPTION statement. Because it is not visible to the user, it cannot be highlighted as the next choice.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1140 fires when a NEXT OPTION clause names an option that was previously hidden with HIDE OPTION — per the official guidance, a hidden option isn't visible to the user, so it can't be
highlighted as the next choice.
NEXT OPTIONnaming an option already hidden viaHIDE OPTION, per the official guidance — the direct, only cause.- Menu logic that hides an option and then later (incorrectly) still tries to route focus to it, a design inconsistency between the hide logic and the navigation logic.
Solutions / Resolution
- Don't set
NEXT OPTIONto a currently hidden option, per the official guidance — route to a visible option instead. - If the option should actually be visible at that point, review the
HIDE OPTION/SHOW OPTIONlogic to confirm it's un-hidden beforeNEXT OPTIONtries to target it.
Examples
Targeting a hidden option
HIDE OPTION "Delete"
...
NEXT OPTION "Delete"
-- -1140: "Delete" was hidden and can't be the next highlighted option
Diagnostic Checks
- Check whether the
NEXT OPTIONtarget was hidden viaHIDE OPTIONearlier in the program's execution, and either target a visible option or re-show it first.
Related Errors / Related Topics
- -1133 — "The NEXT OPTION name is not in the menu." A related
NEXT OPTIONerror, about the name not being declared at all rather than being declared but currently hidden.
NEXT OPTION targeted a currently hidden option — target a visible one, or SHOW OPTION it
first.