Hi all,

I've having a bit of a problem in a program I'm creating, and I'm pretty sure it's an error in VB that's causing it. Hopefully someone has seen this error before and will recognise it, so I can learn how to fix it.

In my project, I have a form which contains a bunch of textboxes, listboxes and comboboxes that the user needs to fill in with a whole bunch of information. They fill this in to begin with (I'll call this "part A") and then they click on a button labelled "Next". This causes everything on the form to be cleared so they can enter more information into the same form, using the same controls. (I'll call this second round of entering information "part B".)

After they've finished entering the info the second time, they click on "Next" again, and this takes them to a new form. This new form has a "Back" button (in case they change their mind) that takes them to the previous form by Hiding the current form and Showing the previous form.

Okay, here's the problem. When the user clicks on Back, and the previous form is Shown, the controls on the previous form contain the information from part A, not part B. This doesn't make any sense at all - when I reshow the form, the controls on the form should contain the information that was last entered ie the part B info. I don't clear this info or anything, yet the info from part A magically appears into the textboxes and listboxes.

Here's the really weird part, that leads me to believe it's VB's fault. When I step through the program line by line, using F8, the program works perfectly! It's only when I run the program normally without stepping that it screws up. Of course, stepping through the program should result in the same output as running the program normally.

Has anyone else seen this before? When showing a form that has previously been hidden, does the contents of the form automatically change by themselves? In case it helps, I'm using VB6, and I've tried my program on two different computers, with the same results. I've also shown the program to several other people, and they were just as stumped. I'm convinced that either (1) There is an error in VB, (2) My program is possessed by the devil, or (3) A poltergeist is behind all of this. I'd be extremely grateful for any ideas. (Sorry to make this so long!)

Justin
A CS student at the University of Western Australia