Variables Getting Reset After Displaying Form from another Form
Posted on 2003-12-05
Situation: I have a main form, a menu option displays a second form. 2nd form contains a listbox of items, selecting an item from the listbox allows a button to be pressed which displays a 3rd form. Upon closing the 3rd form the focus is returned to the 2nd form.
Everything works fine when you've selected 1 item from the listbox, but on the second item (no matter which item in the list that may be), by display/unloading the 3rd form variables held in the 2nd form are reset, i.e. a disconnected recordset I hold from having say 10 items suddenly has 0.
I initially thought it was maybe because I was displaying both forms 2 and 3 as modal, but I've tried it with modeless and the same thing happens. I'm confused why values held in the 2nd form should be effected by another form, in addition not all variables are reset making it even more confusing, any help/suggestions would be great.
Running VB6 SP5 on Windows 2000 Pro