>To answer your question below - YES the code below is the propery_access method
>
>YOUR COMMENTS BELOW
>---------------------------------------------------------
>David,
>If I'm reading it right there is a 'property' called price not a method.
>
>* Which object is this? Is this price_access method itself ?
>parameters ItemNumber
>this.price=ItemNumber+1
>return this.price
David,
You're querying a property. If you include a parameter with it VFP tries to return you an array value (it could be an array property where you were requesting nth element).
You could do that with _Assign however.
*Price_Assign
parameters ItemNumber
this.price=ItemNumber+1
this.Price = 5
replace myField with this.Price
For a form method like you sampled in your code (replace...) add a method to form say GetPrice. Then in GetPrice method you could code freely like in old good days :
* Form.GetPrice 'method'
lparameters tnItemNumber
external array arrPrice
select price from products where ItemId = tnItemNumber into array arrPrice
return iif(_Tally=0,0,arrPrice)
* Commandbutton.click
replace myfield with thisform.GetPrice(thisform.ItemNo)
Cetin