Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Late binding, calling object property/method by reference?

Status
Not open for further replies.

hwkranger

MIS
Nov 6, 2002
717
US
Is it possible to call a user define object method or property by reference or alias?

As to why I'm doing this in access is a long story...

But -- what I need to do is to be able to call the value that is stored in either a user define type or object.

I know that I could use a collection, and then be able to reference by name/index. Or I could make the type or object members as objects with their own indexes. These routes are too much work.

example of what I would like to do:

given
Code:
  dim o as clsMyObject
  o.ID = 15 
  debug.print o(0)
  debug.print o("ID")

Any help would be great! Thanks.



Randall Vollen
National City Bank Corp.
 
I solved this problem, effectively by manually mapping via a function with a case statement, and use of a variant return type.

Would like a better solution though.

Randall Vollen
National City Bank Corp.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top