Are you directly updating the field on the other form? If so, you could
get the ping-pong affect and end up w/ a stack overflow. I'd recommend
updating the other form's table via a tCursor instead of through the
field on the form. ChangeValue only fires when the field is updated via
the form - it doesn't fire if the table is updated directly.
Craig wrote:
> Jeff and Fred,
> Thanks for your help. I used Jeff's at this point because of the
simplicity.
> Fred's suggestion, however, may come in handy. With the two fields, if I
> change field 2, field 1 changes. Suppose I want the reverse to also
happen?
> I am concerned that it will go back and forth.
> Craig
>
> "Fred Z" <fredzcalgary@[EMAIL PROTECTED]
> wrote in message
>
news:c1fcac80-c199-4d9f-afae-e5d0302f3955@[EMAIL PROTECTED]
>> You could use the reason method with the following example taken
>> directly from Pdx help.
>>
>> The following example assumes that a form contains a multi-record
>> object bound to the Orders table, and that the ****p_VIA field is a set
>> of radio buttons. Assume also that the form is in Edit mode. The
>> newValue method for ****p_VIA displays a message indicating why
>> newValue was called. When the form opens, the Reason will be
>> StartupValue.
>>
>> ; ****p_VIA::newValue
>> method newValue(var eventInfo Event)
>> ; show why the newValue method was called
>> msgInfo("newValue reason",
>> iif(eventInfo.reason() = StartupValue, "StartupValue",
>> iif(eventInfo.reason() = FieldValue, "FieldValue", "EditValue")))
>> endMethod
>>
>> When the user scrolls through the table or clicks the nextRec button,
>> the Reason will be FieldValue.
>>
>> ; nextRec::pushButton
>> method pushButton(var eventInfo Event)
>> action(DataNextRecord) ; this triggers a newValue for ****p_Via
>> ; with a Reason constant FieldValue
>> endMethod
>>
>> When the user chooses a different radio button on ****p_VIA or clicks
>> the changeRadio button, the Reason will be EditValue.
>>
>> ; changeRadio::pushButton
>> method pushButton(var eventInfo Event)
>> ORDERS.****p_Via = "US Mail" ; this triggers a newValue for ****p_Via
>> ; with a Reason of EditValue
>> endMethod
>>
>> Or, if you want to test for the change in a tableframe try
>>
>> method action(var eventInfo ActionEvent)
>> var
>> vActionID smallint
>> endvar
>>
>> vActionID=eventinfo.id()
>>
>> if vActionID=DataPostRecord or vActionID=DataUnlockRecord {plus maybe
>> a test to see if the record actually changed}
>> then
>> ............your code here
>> endif
>>
>> Good luck
>
>


|