Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Evals("myPublicVariable") do nor work: have you any alternative way?

1 view
Skip to first unread message

BUX

unread,
Dec 8, 2005, 4:26:17 AM12/8/05
to
I have to get public variable value using variable name.
Evals("myPublicVariable") do nor work
How can I do?

thank you

Steve Jorgensen

unread,
Dec 8, 2005, 5:45:13 AM12/8/05
to
Eval can't see public variables, but it can see public functions. Make a
public function that returns the value of the public variable, and use that in
your Eval call.

Depending on exactly what you're trying to do, a better alternative might be
to not use public variables at all and use class members instead. You can
access class members by name using the CallByName function.

BUX

unread,
Dec 8, 2005, 10:03:20 AM12/8/05
to
... class members .... good idea

thank you

david epsom dot com dot au

unread,
Dec 9, 2005, 1:38:56 AM12/9/05
to
Or you may choose to use one of the pre-existing
classes.

I find that when a form class is not suitable,
a member of the tabledefs collection or the database
properties collection is nearly always what I need.

(david)

"BUX" <NoS...@NoSpam.it> wrote in message
news:sg4gp1hrntrfmragh...@4ax.com...

0 new messages