Topic: Fields being erased
Hi All,
During my testing I've run across something strange:
Here's what I have:
- Form A with fields and a button to take me to Form B
- Form B has fields and a SAVE button.
.
I enter stuff on Form A, then click the button to go to Form B.
I enter data into Form B, then hit SAVE
When I go back to Form A, my new field entries are erased.
.
What's strange is that I have another application where this does not happen. I've been comparing the 2 applications and can't find anything different.
.
I'm assuming it's something I've done or not done?? My feeling is that it's something basic but I think I'm having a senior moment because I can't find it.
.
UPDATE I've found the problem but am not sure how to fix it.
Recently Brian was kind enough to help me with the following code to refresh a field on an open form:
procedure frmService_btnSave_OnAfterClick (Sender: TObject);
var TableID :integer;
begin
TableID := frmEquip.btnSave.dbGeneralTableId; // GET THE FORM ID
frmEquip.ShowRecord('tbl_Equip', TableID); // UPDATE THE FORM
end;
.
This code does what I needed but apparently the frmEquip.ShowRecord('tbl_Equip', TableID); // UPDATE THE FORM is what is causing me to lose the entries on Form A that have not been saved.
.
Thanks, Frank