I’ve run into this on and off for years. Today it bugged me enough to go looking…
Setup:
Db is set to display the ‘About’ doc if it changes.
There is a db post open script. It involves no UI commands and executes fine (turn on debugger, no errors).
‘About’ doc has one line of text. Nothing embedded, no fancy hide/whens, nothing tricky, just a line of text.
If I modify the ‘About’ doc, on the next db open, I get the ‘cannot execute’ error.
If I open the ‘About’ doc using ‘help - about this db’, no error.
If I open the db again after seeing the error, no error on subsequent db opens.
What’s happening:
The default view includes a post open event: @Command([ViewExpandAll])
Notes seems to be opening the ‘About’ doc, then running the post open event in the context of the ‘About’ doc. Guess you can’t expand an ‘About’ doc hence the error.
Subject: FYI - Cannot execute the specified command and ‘About’ doc
I think you are right – it is the sequence of opens. If so, maybe you could detect whether a view is open vs a doc is open. I wonder if using something like this might help:
Subject: RE: FYI - Cannot execute the specified command and ‘About’ doc
Another thing you can try that worked for me is to make another view without the postopen ViewExpandAll the default view. Then in the view frame of the frameset open the other view using a formula. This also keeps the error message from appearing when you open the frameset in design.