>I used to know how to do this two yrs ago, but I totally forgot.
>
>I want to create a custom property in my form, lets call it RATE.
>
>I want to be able to set it to a value in that form programatically.
>
>Then I want to be able to call a second modal form, from the first
>form, by clicking a command button. I want that second, modal form,
>in its INIT, to access the property of the first form, and then
>display that value in a textbox of the modal form.
>
>Lets call the first form ORDER. Lets call the modal second form
>ordersupp. Ordersupp should be able to access the value of that
>RATE property in the ORDER form, display it in a text box, allow the
>user to change it, and in the QUERYUNLOAD of the second form, it should be able to stuff that changed value BACK into the property
>of the first form.
>
>Please dont ask me WHY I want to do this, or tell me that I shouldnt
>do it, or that there are 27 other BETTER ways to accomplish something
>similar. I am simply trying to remember how properties, methods etc
>work between two different forms. What I am describing must be a
>do-able thing.
>
>
>I am looking through WROX revolutionary guide to VFP oop, but havnt stumbled across what I need yet.
>
>thanks!
First form button click:
DO FORM ordersupp WITH THISFORM
Create property in form ordersupp called "ParentForm"
Form ordersupp Init:
LPARAMETER loParentForm
THISFORM.ParentForm = loParentForm
loParentForm = NULL && For completeness
THISFORM.MyTextBox.Value = THISFORM.ParentForm.RATE
In form ordersupp Queryunload:
THISFORM.ParentForm.RATE = THISFORM.MyTextBox.Value
THISFORM.ParentForm = NULL && make sure we clear the object reference
Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.