My Assistant
![]() ![]() |
|
|
Sep 12 2005, 05:15 AM
Post
#1
|
|
|
UtterAccess Member Posts: 25 From: KL, Malaysia |
Dear All,
I would like to use the value of a variable defined in the module in a report. I created a text box and assigned the control source property to "=[sCurrency]" where sCurrency is the variable defined in the module. This is not recognized and asking for the parameter value for "sCurrency" while running the report, but when I use the same variable in forms it shows the value stored in the variable "sCurrency". This is very much required as I need to print the currency type in the reports using the public variable. Could any one give any suggestion for this ? Thanks in advance. Bye, Murali |
|
|
|
Sep 12 2005, 05:21 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 1,644 From: Sweden |
You must write a function that will return the value. Something like this
Public Function GetCurrency() As String GetCurrency = sCurrency End Function Then use the function name in the control source property =GetCurrency ________ Bo Melin |
|
|
|
Sep 12 2005, 05:22 AM
Post
#3
|
|
|
UtterAccess VIP Posts: 5,486 From: Brixton, front line |
Hi Murali,
Use a function to return the value of your global variable: CODE Public Function fCurrency() As String fCurrency = sCurrency End Function Make the function return the same datatype as sCurrency (I'm guessing it's a string since it's called 's'Currency) hth, d |
|
|
|
Sep 12 2005, 09:37 PM
Post
#4
|
|
|
UtterAccess Member Posts: 25 From: KL, Malaysia |
Dear Bo Melin & CheekyBuddha,
Thank you so much, it works. I really appreciate the great support provided by both of you. Regards, Murali |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 23rd May 2013 - 10:17 AM |