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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alias Name in Property

Status
Not open for further replies.

MarvinR

Programmer
Oct 29, 2001
37
HK
How can I access a field in a DBF when the alias name is stored in a object's property ?

For exemple:
oo.aliasname = 'INVOICE_2001'

I want to access the CUST_ID of this DBF, but obviously I can't use

oo.aliasname.cust_id

What way I can use so I don't need to do too much "&" substitution ?
 
MarvinR

This works for me:

Code:
SELECT (thisform.tablename)
replace (thisform.tablename)+".fieldname" WITH "Mike"


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi

Mike's code will work.

This will also work..
cCustId = EVAL(oo.aliasname+".cust_id")

OR

oAlias = oo.aliasname
cCustId = &oAlias..cust_id
cCustName = &oAlias..cust_name


This will not work.. &oo.aliasname..cust_id

:)

____________________________________________
ramani - (Subramanian.G) :)
When you ask VFP questions, please add VFP version.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top