Code: Select all
procedure TfrmFamily.MainQueryBeforeScroll(DataSet: TDataSet);
begin
if TUniQuery(DataSet).Modified then
InfoMessage('modified') // my own function
else
InfoMessage('not modified');
if MainQuery.Modified then
begin
if MessageDlg('Save Data Before Move to Next Record?',mtConfirmation,[mbYes,mbNo],0) = mrYes then
begin
btnSave.Click;
end;
end;
end;
but when the program is run and i change one ore more field in the record the modified property is always false, and always show message Not modified.
I try to check MainQuery.state where state is in dsEdit, but when BeforeScroll event occured the MainQuery.state is change to dsBrowse.
Please help me immediately. Thank you
Mohammad Yusuf