From: jeffshoaf@alltel.net   
      
   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" wrote in message   
   > news:c1fcac80-c199-4d9f-afae-e5d0302f3955@t54g2000hsg.googlegroups.com...   
   >> 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 Ship_VIA field is a set   
   >> of radio buttons. Assume also that the form is in Edit mode. The   
   >> newValue method for Ship_VIA displays a message indicating why   
   >> newValue was called. When the form opens, the Reason will be   
   >> StartupValue.   
   >>   
   >> ; Ship_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 Ship_Via   
   >> ; with a Reason constant FieldValue   
   >> endMethod   
   >>   
   >> When the user chooses a different radio button on Ship_VIA or clicks   
   >> the changeRadio button, the Reason will be EditValue.   
   >>   
   >> ; changeRadio::pushButton   
   >> method pushButton(var eventInfo Event)   
   >> ORDERS.Ship_Via = "US Mail" ; this triggers a newValue for Ship_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   
   >   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|