Database forms go rogue


#1

When I open my main file, its .Initialize opens 8 other files in a specific order, some of them secret and some intentionally visible. The visible ones stack on top of each other in sequence, with the main file brought to the front again after each opens. The last line of .Initialize opens one last file/form with an OK button; this is done so you can see what is currently in that file and pressing OK makes it go secret and leaves the original file/form on top.

If it stopped there, everything would be fine, and it did just that in Pan 6. Instead, whether I push the OK button or do nothing, the 3 other files/forms that are intended to remain visible but behind the main file start popping to the front one at a time. I have to go to the Window menu to get my dialog to the front so I can dismiss it. And because this is Monday, at this point Pan X just crashes. It did this the first 3 times; the 4th time is apparently the charm as it is remaining alive for now.

How can I get my other files to just stay put in the back? What is making them want to come forward in the absence of any other executing code?


#2

It would probably be useful to see the code that implements this. I expect it is this code that is having the problem, regardless of whether it is your programming error, or Jim’s.


#3

I think I may have discovered the source of the problem, and it isn’t code. Each of the “visible” files has its own .Initialize, which mainly serve to SelectAll then Sort into a desired order. In Pan 6, I could watch this happen in each file as it came up. In Pan X, they seem to be executing asynchronously, and when the files unexpectedly jump to the front I can see that they’re still finishing up executing their own .Initialize code. I’d sure like to see this brought under control.


#4

You coud add it to the .Initialize of the primary file. Have each file do the SelectAll and Sort as it’s opened.


#5

Yes, I could do that, but why do I have to? The idea that one file’s code can take its sweet time to finish while other code that called it continues on is a pretty radical departure from how Panorama has worked (for me) in the past. Those .Initialize files have other work to do as well. I’d like an explanation, and some rules on what I can expect in this area as I move on.


#6

I didn’t intend this to be a rhetorical question. Do .Initialize procedures in X execute asynchronously unlike in 6? What can I expect in this area?