-
Passing Parameters
I would like to ask how do i pass a parameter/value of a variable form one form to another form.
For example i have a user's log in form, how do i save the user's name to another form once i log in? i want to know which user log in so that i can make preferences to that user. every user have different user. i have a mdiform.show after i log in?
what are the functions i need to make and where shall i put it?
-
If your using multiple Forms, you could Dim a Public
variable in a Module (That way the Variable is available to ALL
other Forms).
-
It's probably better to use a module to store information like this. Otherwise, when the form is unloaded, you'll lose the information.
If for some reason the other form is permanently loaded, you can make a Public variable on one form, and simply use:
Form2.VarName = Form1.TextVar.Text
:)