Need to get the value of a field in another form without loading it
Posted on 2006-07-11
I have a situation where a checkbox (say chkField) is set in form1. This passes control to form2, which goes on to form3. Forms 1 and 2 are still displayed under form3 and as the later forms are closed control is returned to the previous one.
Form3 now needs to know the value of the checkbox in form1. I can simply reference form1.chkField, and this gets the value OK, but it invokes the Load event in form1 and it blats over the top of form3 on the screen. Similarly if I try saving the checkbox value in form1's Tag property.
I don't want to set a global variable as there are dozens of forms in this program and this only affects two. It's frowned upon where I'm working anyway.
I'm sure there's a simple and elegant solution to this, and it's worth 500 points to me if I can get a quick and simple answer...