Hi All,
The problem is very simple to explain but sounds stupid, but if I can do this then I can do what I want (which is slighlty more complicated and Harder to explain) :
Say I have, 100 forms. Each form is the same but with diffrent names.
Each form contains a text box, a Dropdown box and a button.
Text box1 : Type in message "Bill lives here".
Dropdown1 : Select one of the 100 forms names.
Button : When pressed, displays the messaage "Bill Lives Here" and then goes to the form that you selected in the dropdown.
I want to put the same "Global" sub on each of the 100 buttons, and have the information in the text box and dropdown sent to the Global sub as parameters.
This is how I would imagine it be like :
--------------------------------------------
Private Sub MsgAndMove_btn()
'Set up Variables
Dim Var1
Dim Var2
Var1 = me![MessageBox_Text]
Var2 = me![Form_DropDown]
'Call Global Procedure
Msg_And_Text ,Var1 ,Var2
End Sub
--------------------------------------------
Then the Global module would then use Var1 and Var2 to :
--------------------------------------------
Sub Msg_And_Text
msgbox(Var1)
openform Var2...blah...blah
End Sub
--------------------------------------------
Thanks alot for even reading this far....
DerickD
The problem is very simple to explain but sounds stupid, but if I can do this then I can do what I want (which is slighlty more complicated and Harder to explain) :
Say I have, 100 forms. Each form is the same but with diffrent names.
Each form contains a text box, a Dropdown box and a button.
Text box1 : Type in message "Bill lives here".
Dropdown1 : Select one of the 100 forms names.
Button : When pressed, displays the messaage "Bill Lives Here" and then goes to the form that you selected in the dropdown.
I want to put the same "Global" sub on each of the 100 buttons, and have the information in the text box and dropdown sent to the Global sub as parameters.
This is how I would imagine it be like :
--------------------------------------------
Private Sub MsgAndMove_btn()
'Set up Variables
Dim Var1
Dim Var2
Var1 = me![MessageBox_Text]
Var2 = me![Form_DropDown]
'Call Global Procedure
Msg_And_Text ,Var1 ,Var2
End Sub
--------------------------------------------
Then the Global module would then use Var1 and Var2 to :
--------------------------------------------
Sub Msg_And_Text
msgbox(Var1)
openform Var2...blah...blah
End Sub
--------------------------------------------
Thanks alot for even reading this far....
DerickD