You question is a bit vague but I believe your problem could be solved with the use of a global variable. The way I do this is to create a seperate module for my globals and assign their values when I need them .. like this.
----------------------------------------------------------------
basGlobals
Public gmyGlobal as DataType (whatever it needs to be string, integer, ect)
----------------------------------------------------------------
Private Sub Command1_Click()
gmyGlobal = Value
Form2.show
End Sub
----------------------------------------------------------
If you do it this way the value will be retained even if you unload the initial form. You do have to keep in mind that the global variable will hold the value you assign it until you either reassign it or end the program. My point there is you always need to be aware of it's value when using it in multiple places throughout your application or you may get some unexpected results.
Hope this helps.
Kenny Alligood
|