-
Hey all.
what is happening here?
I have two forms and I'm using the same code I've used 100s of times before to switch back and forth.
On formA, a button click event:
Load formB
formB.Show
Unload formA
On formB, a button click event:
Load formA
formA.Show
Unload formB
Isn't that what everybody does?
Well, I don't know what's happening here, but I have a case where formB loads but it won't unload. When I click to formB, it appears and A unloads. But then when i click back to A, formB is still there, behind formA. I don't know why! I've tried several things:
in the queryunload, I put Set formB = Nothing
I've typed unload formB several times in the code
At runtime, when the form is still visible behind formA, I can close it by clicking on its X block ( after the first try at closing via the button). Or I can leave via the xblock on the form (and put a Load formA in the queryunload sub). But I'm really just wondering what would cause this.
Oh, I am using a Form_MouseMove sub but I used a boolean to exit this sub if the form changing button is pressed.
Ideas?
Thanks
Wengang
-
Just rem out your code in the mouse_move and see if it still plays up...
Pretty sure it's in there somewhere
DocZaf
{;->
-
Put the Unload statement before the .Show method and see.
And make sure they are not Modal forms (We can see they are not from your code).
-
There is nothing wrong with the code you submitted so it has to be somewhere else.
If possible post all of your code so that people around here can have a look at it.
Best regards