Topic: From edit to new

Hi friend, I have one wish.
I take edit data from gridtable,
then I want to save it into new data and
in a new line in a gridtable view. is it possible?
if yes, how to make a button.
Can anyone help me, please ..
Thank you friend

Re: From edit to new

.

Post's attachments

Attachment icon test.7z 3.3 kb, 225 downloads since 2019-08-01 

Re: From edit to new

On your edit form in addition to your normal SAVE button, create a button called "Save As New" and place the following code on it.


procedure Form2_SaveAs_Button_OnClick (Sender: TObject; var Cancel: boolean);
begin
    Form2.Save_Button.dbGeneralTableId:=-1;
    Form2.Save_Button.Click;
end;


See attached for an example.

Post's attachments

Attachment icon SaveAs New.zip 336.54 kb, 263 downloads since 2019-08-01 

Re: From edit to new

@sibprogsistem,  @ehwagner
Thank you buddy for the solution, this really helped me.
My Respect for you, Once again, thank you