G Guest Jun 26, 2006 #1 Is it possible to refer to a public variable declared at module level in a query and in a control (both report and form).
Is it possible to refer to a public variable declared at module level in a query and in a control (both report and form).
R RoyVidar Jun 26, 2006 #2 jalewis999 wrote in message Is it possible to refer to a public variable declared at module level in a query and in a control (both report and form). Click to expand... Not directly, but through a public function residing also in a standard module. public function GetMyVariable() as <your data type> GetMyVariable = g_MyPublicVariable end function Then refer to that function both in the query and report. Note again, that the function must reside in a standard module, not a forms/reports module.
jalewis999 wrote in message Is it possible to refer to a public variable declared at module level in a query and in a control (both report and form). Click to expand... Not directly, but through a public function residing also in a standard module. public function GetMyVariable() as <your data type> GetMyVariable = g_MyPublicVariable end function Then refer to that function both in the query and report. Note again, that the function must reside in a standard module, not a forms/reports module.
W Wolfgang Kais Jun 26, 2006 #3 Hello "jalewis999". jalewis999 said: Is it possible to refer to a public variable declared at module level in a query and in a control (both report and form). Click to expand... No. You will have to create a function in a publi module that returns the value stored in the variable and use this function in your query or control.
Hello "jalewis999". jalewis999 said: Is it possible to refer to a public variable declared at module level in a query and in a control (both report and form). Click to expand... No. You will have to create a function in a publi module that returns the value stored in the variable and use this function in your query or control.
G Guest Jun 26, 2006 #4 Thanks problem solved RoyVidar said: jalewis999 wrote in message Not directly, but through a public function residing also in a standard module. public function GetMyVariable() as <your data type> GetMyVariable = g_MyPublicVariable end function Then refer to that function both in the query and report. Note again, that the function must reside in a standard module, not a forms/reports module. Click to expand...
Thanks problem solved RoyVidar said: jalewis999 wrote in message Not directly, but through a public function residing also in a standard module. public function GetMyVariable() as <your data type> GetMyVariable = g_MyPublicVariable end function Then refer to that function both in the query and report. Note again, that the function must reside in a standard module, not a forms/reports module. Click to expand...