carrying data between forms
I have a form on which the user makes a selection.
The selection prompts another form to open. The form is used for two variations of the selection.
The user has these options:
x1
x2
y
If x1, then some of the textboxes are disabled, etc.
How do I get the value (1 or 2) to the new form? I could use a global variable I suppose, but isn't there a better *cleaner* way? If it was a procedure running I would pass the value byval or byref, but how do you do this for a form_load()?
Maybee not what you want...
I don't know exacly what you mean when the user have the
options x1, x2, y but if selection is in a control you can
alway from the other form read
frmFirstform.Text1.Text, frmFirstform.check1.Value, frmFirstform.option1.Value and so on...
Or if it's in a modular variable frmFirstform.variablename.
That is if you haven't erased the first form from the memory with something like "Set frmFirstform = Nothing", when the second form loads.
Maybee a better solution?
You don't want selection of the user to depend on the text or listindex of the combobox.
What if you let it depend on then itemdata property?