That works well... with one exception. I can't seem to make the 2nd form close.
If I place @exit in the code for the command button, it takes me to my custom "Menu" form, but instantly exits that form, bringing me to the Application Menu, and leaving the 2nd form still open as a tab at the bottom.
BTW, placing @exit before @SelectTreeItem like outlined below, causes a crash when run while the custom "Menu" form is NOT open already. (Don't know why it works if "Menu" form is open. It shouldn't matter, should it?)
var success as Int
@exit
success = @SelectTreeItem("Price List!Forms!Search/Update!Price List!MENU")
If @exit is placed
after @SelectTreeItem, it does not crash, but it functions otherwise (as I would expect in this case) as described above. So it doesn't matter where I place @exit, it always executes
after @SelectTreeItem.
When that didn't work, I tried to use @SelectTreeItem rather than @exit to get out of the 2nd form. But both
success = @SelectTreeItem("Search Menu!Exit Search Menu") and
success = @SelectTreeItem("Add Data Menu!Exit Add Data") do nothing even though they return "1" indicating that they were each successful from their respective modes. And
success = @SelectTreeItem("Search Update Menu!Exit Search/Update") only causes Sesame to highlight that selection in blue, it does not execute it. This also returns a "1".
I was able to close the 2nd form from a command button using @macro. But that is not acceptable because popup warnings are deactivated during macro playback, and any changes or updates in the form may be lost because there is no warning, the macro just blindly exits. (That reminds me. @exit is not a good solution anyway, since it exit without saving changes.) I wonder, if @SelectTreeItem functioned properly on the various exit selections, would it give a warning that changes had not yet been saved?
Can you check to see if @SelectTreeItem exits you out of a form? Is it something that I am doing wrong or is this a minor bug?
Thanks.