Refering to a variable within an expression

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello to all.

I am trying to refer to a variable that is declared in the class module from
within an expression for control source.

I would appreciate any suggestions.

Thanks.
 
Dimka said:
Hello to all.

I am trying to refer to a variable that is declared in the class
module from within an expression for control source.

I would appreciate any suggestions.

Thanks.

You need a wrapper function whose only purpose is to return the variable value.
The function can then be used in expressions and queries.
 
Thanks. That works.

Can I also use property instead of a wrapper function, like this:

Property Get Total() As Integer
Total = 5
End Property

And if so, how do I refer to a property from within an expression for a
control?

Thanks
 
Back
Top