>Using VFP5.0 I have a multi-page form. Container1 on Page1 contains all the address fields (street,city,etc). Grid1 on Page7 is used to view/enter old_addresses. Whenever a change is made in any of the address fields in Container1 I want to have the old address entered in the old_addresses table. To accomplish this I use the LostFocus event of the Container1 and check the CurVal of each field; if there has been any change in any field then an Insert command enters the OldVal in Grid1 followed by a TableUpdate()command. My problem is this: when I change the data in a field in Container1 and move on, the old address gets entered in Grid1 and looks fine. If I don't close the form but browse the OldAddress table the old address is listed in the table. However, once I close the form or leave VFP the data disappears from the table. Why?
>TIA
>--lincoln
Lincoln,
Are you doing a TableUpdate on both the table with the new address and the table with the old address? Is there a view involved? If so, are the table(s) under the view buffered? They will have to have a TableUpdate() also if buffered.
Use GetFldState(-1) to determine whether the data in your buffered tables needs to be updated.
HTH
Barbara