On my .Initialize procedure I do the following:
;closes all forms and procedures, among other things makesecret
openform “Edit Form Rename”
openform “Edit Form”
Message “Just past openform statements”
The purpose with the makesecret is to ensure that I only have the forms I want open and I do not want to see any dangling procedures that I had opened when I quit.
Since I often have more than one database open I found suddenly that one particular database would disappear. It was open but had been made secret.
I boiled it down to the fact that after this “Workhorse” database is open I may open another database.
If I activate the “Workhorse” database with the pulldown menu at the top or I click a section of the database that is visible but not active there is no problem. Ditto for “Apple `” dual keystroke.
HOWEVER, I use Keyboard Maestro 10.2 and if I use a hot key to activate “Workhorse” even though “Workhorse” is already open it, Keyboard Maestro, does activate the database but also the .Initialize Procedure, at least part of it, is also executed.
I will see the “Workhorse” database for a moment and then “poof”, it’s invisible.
makesecret is executed but the follow on Openform statements are not.
So, the database is made secret and I have to quit Pan X, save the invisible “Workhorse” database, then reopen with a cold start of Pan X.
I know that Jim uses Keyboard Maestro. I mention this mainly because some others may have had this vexing phenomena.
The problem is only occurring when more than one database is open and the “Workhorse” database is not active.
I may upgrade Keyboard Maestro to see if this goes away. That is not necessary actually. I am running Version 10.2 that says that is the current latest version.
Computer Mac Studio, OS 13.4.1 (Ventura)