I have a tab control that I use to display various information downloaded from a server. When a user selects a tab, the '.Value' property is used to establish which page they are viewing and gets the appropriate data.
This has stopped working - i.e. the value returned is now always 0. I can get it to work by cutting code, compiling (with errors) and the pasting the code back in but when I restart the database the .Value property stops functioning again.
Has anyone else had this problem? Is there a workaround?
Further (further!) investigation has let me to find the culprit, which as a totally side, side, side effect -
The background colour of the header (which I change depending on whether the front end is connected to my test or production server) seems to have the effect of disconnecting the form from the code a bit.
Form_frm_Main.FormHeader.BackColor = ...
I've commented out this line of code and everything appears to be working again. (I found it because the combo boxes are in the header, and I only added the colour changing code yesterday).
No problem. I have an idea that might work (unless i've read your previous posts wrong, im still half asleep!)
For each control on the independant tabs, you could setup any reference to them from them if you know what i mean. That way whenever you change the tab, regardless of what happens elsewhere, the references should be created and held. You could double up the coding for when the tabs change on the multipage element too. This will make sure that the references are always maintained.