Tab Panel Behavior problems

I’m having peculiar behavior results.
I have a form with a Tab Panel Object in it.
The Tab Panel buttons are programmed to do things in conjunction with the panel they open
All of that works fine.

The problems occur when the file is opened. I will get alerts that a couple of databases are not open (before any of the forms open) and then the data from the first record of the form shows up plastered over a different for in a different file (I’ve done this on two different computers).

There is not action in the .Initialize procedure that would call the other abs, but they are called from the “panelcontrol” procedure I use with the buttons to call the panels.

Is the “panel control” procedure being called while the form opens? Or is it because I define the Tab Panel as “” in .Initialize to make sure the Default panel is up? Is that the same as calling the

Either way or another, why some of the form information be plastered all over a different form in a different file?

Additional: It definitely has something to do with the panel buttons going off during .Initialize, I get the same error messages when I press the buttons (I took this file home so the files are not in quite the same place as at work).
The data fields that are plastered across the other file (DataFiles_X in the picture below) are synchronized with the data in CapCamp2019 ie: when I scroll through the records, they change on DataFiles_X. However, images stay in place. When I move CapCamp2019, the fields stay where they are on DataFiles_X instead of following the movement of CapCamp2019

I believe this is the problem. I tried defining my tab panel variable as “” in the .Initialize procedure and when I opend the file it totally messed up the form it was on. I had to open the file to the datasheet and change that variable back to one of the proper tab forms.

If you can not open to a known tab form within the form containing the tab panel, you might want to make a special opening form to use while things are loading. If I was doing this I would make a new form called Tab_Loading and add it to the tab panel forms list. I would then unclick the Show Tab Buttons option in the Tab Panel Options panel. But now I have no tab panel buttons to navigate with…now what? Simple, I make a Segmented Button Object with all the tab form names except the new Loading form and place that above the Tab Panel Object. I set the Mode to Radio and the Data to the variable for my tab panel choice. Now the .Initialize can set the panel choice variable to the Loading panel form and open it at startup. When everything is done loading I can set the tab panel to the form I need at that time when everything is available. Things now look as they were suppose to and the Loading panel is totally invisible to the user.

That’s a work around, but it doesn’t seem that is how things should work.
I can understand the variable “” causing problems (though not that catastrophic).
I have created a default window and assign the variable “Default” in .initialize. Which seems to kinda solve the problem.
But why does the Tab Buttons Bar get activated on Load? And as it does, it calls my “panelcontrol” procedure but doesn’t seem to follow it properly. I have a bunch of If/else prodcedures to control the buttons, which should go straight to default as none of the buttons have been selected to give it a variable to work with.
And, it appears that if the form in which the Tab Panel is included is the open form when starting, all of this takes place before the .Initializing work takes place?
It just seems like a lot of things that don’t happen as expected.

I’m not really quite following you. But I can tell you that the tab panel variable is never supposed to be empty. When the form opens, it immediately figures out what the first panel is and sets that up. So the first panel will automatically be in place without ever pressing a button, and that does happen before the .Initialize code is run.

Ok, so tabpanelvariable="" falls into “it hurts when I do that, don’t do that.” Though its ability to mess up another file is scary.

So, opening a file with a form that has a tab panel as the opening form results in the first tab panel button being “pushed”? That’s what my experiments indicate. Other than changing the first button to call a blank form (or not having the buttons call a procedure) is there anyway to catch this in the buttons procedure. Is there something the buttons procedure can look for even before the .Initialize procedure runs?