Trying to bring up a MessageDlg before closing table. Compiler error;
Undeclared Identifier: 'mbYesNo'.
How and where should I make this declaration?
I'm a newbie, so a code snippet/small example will explain better.
Thanks, Paul.
==============================================================
procedure TForm2.Table1BeforeClose(DataSet: TDataSet);
begin
if (Table1.State = dsEdit) or (Table1.State = dsInsert) then
begin
if MessageDlg('Post changes before closing?', mtConfirmation, mbYesNo,
0) = mrYes then
Table1.Post
else
Table1.Cancel;
end;
end;
===============================================================