Hello,
i'm trying to make a form that will load
either one of 2 tables... (As the form's source)
I figured i would push a button (on formA)
that button has the openform function
i would use that function to pass an argument to formB
to determine which table the form would use...
in formB in the Form_Open function
i would use the argument to determine which table
formB would open and use.
a better alternative
would be to create a "global" variable
that will be use as the table name
throughout the code file...
here is what i have so far:
In FormA:
Public Sub MaintainFunctionList_Click()
DoCmd.OpenForm "MaintainLists", , , , , , "Function"
In FormB:
Dim TableName AS String
TableName = *Argument*
Public Sub Form_Open(Cancel As Integer)
DoCmd.OpenTable TableName
how can i pass the argument "Function"
to FormB so i can use it as a string and assign it to a variable?
i would greatly appreciate help
thank you
i'm trying to make a form that will load
either one of 2 tables... (As the form's source)
I figured i would push a button (on formA)
that button has the openform function
i would use that function to pass an argument to formB
to determine which table the form would use...
in formB in the Form_Open function
i would use the argument to determine which table
formB would open and use.
a better alternative
would be to create a "global" variable
that will be use as the table name
throughout the code file...
here is what i have so far:
In FormA:
Public Sub MaintainFunctionList_Click()
DoCmd.OpenForm "MaintainLists", , , , , , "Function"
In FormB:
Dim TableName AS String
TableName = *Argument*
Public Sub Form_Open(Cancel As Integer)
DoCmd.OpenTable TableName
how can i pass the argument "Function"
to FormB so i can use it as a string and assign it to a variable?
i would greatly appreciate help
thank you