Brian,
Thanks for your suggestions.
OPTION 1: The ..showrecord doesn't seem to do anything. Here's what I have so far:
procedure frmService_btnSave_OnClick (Sender: TObject; var Cancel: boolean);
var TableID :integer;
begin
// FormA.savebtn.dbGeneralTableId ( GET THE FORM ID )
TableID := frmEquip.btnSave.dbGeneralTableId;
showmessage('TableID = '+ intToStr(TableID));
// FormA.ShowRecord('tblname', [currentid]) ( UPDATE THE FORM? )
frmEquip.ShowRecord('tbl_Equip', TableID);
.
The showmessage shows the ID as 46 which is correct but the calculated Date (NextSvcDate) is not changing. However when I exit the Equip form and go back in, all is OK.
-------------------------------------------
Option 2 - I can't seem to get the syntax right on this one. Here's what I've got:
procedure frmService_btnSave_OnAfterClick (Sender: TObject);
var TableID : Integer;
begin
// FormA.savebtn.dbGeneralTableId ( GET THE FORM ID )
TableID := frmEquip.btnSave.dbGeneralTableId ;
showmessage(' AFTERCLICK TableID = '+ intToStr(TableID));
//FormA.calculatedControl.Value := SQLExecute('SELECT TOTAL(fld) FROM tbl WHERE id='+IntToStr(FormA.savebtn.dbGeneralTableId));
frmEquip.cNextSvcDate.Value := SQLExecute('SELECT TOTAL (calcNextSvcDate) FROM tbl_Equip WHERE id='+ intToStr(TableID));
end;
.
Thanks
Frank