Topic: Duplicate record on Save

I have turned off the option to close form after save.  I do notice, that I now end up with duplicate records if I press the Save button multiple times.  Is there a way to disable the save button after a save when nothing needs to be saved?

Thank you,
  Rob

Re: Duplicate record on Save

Turn on the option to close form after save, then you can change behavior using script.


Create event OnClick for button using for save record.

procedure Form2_buttonSave_OnClick (Sender: string; Action: string);
begin
    Form2.buttonSave.dbDoCloseForm := False; // cancel closing window
    Form2.buttonSave.dbDontResetID := True; 
end;


If you need, i can make example project for you.

Dmitry.

Re: Duplicate record on Save

I am getting an undeclared identifier 'dbDontResetID' - please advise, I am using version 1.46.

Re: Duplicate record on Save

Please, download and install latest version:
http://myvisualdatabase.com/download/myvisualdb.exe

Dmitry.