Problem closing file procedurally


#1

Here’s a little procedure trying to substitute for P6 sets:

openform "Entry Form"
opendatabase "/Users/williamconable/Dropbox/NewPanxAlexWorkshop.pandb"
openform "Entry"
setactivedatabase "/Users/williamconable/Dropbox/AWOpener.pandb"
closefile````

The db's and forms I want to open do open, but the last two lines don't seem to get executed. I stuck messages in after lines 4, 5, and 6. I saw the line 4a message, but neither of the other two.

Also, I'd think that with what I wrote the line 4 window would end up on top, but the line 2 one does.

What am I missing?

#2

The setactivedatabase only requires the name of an open database so including a path will cause an error because setactivedatabase would then be trying to make a nonexistent open database named “/Users/williamconable/Dropbox/AWOpener.pandb” the active database. I assume AWOpener.pandb is the database containing the procedure so you would use: setactivedatabase "AWOpener.pandb".


#3

Thanks, Gary; actually even having the “.pandb” in there causes it to fail, but with just “AWOpener” I’m good. Now, why do the open windows appear in reverse order? (Of course I can just change the procedure to open them the other way round, but I’d like to understand.)


#4

Oops, I should have spotted that when I copied the database name.

I believe there are some anomalies in procedure execution order that I and others have run across. Unfortunately I can’t be more specific that.