Topic: After saving to clear the form?
in "Action for the button" option "Save Record" there is the "Close the current form after saving", how to proceed after saving to clear the form to use again?
My Visual Database → General → After saving to clear the form?
in "Action for the button" option "Save Record" there is the "Close the current form after saving", how to proceed after saving to clear the form to use again?
You would have to use scripts to clear your fields and comboboxes with an event OnAfterClick on your save button.
procedure Form_Button_save_OnAfterClick (Sender: string);
begin
form.field1.Clear;
form.field2.Clear;
form.combobox1.dbItemID := -1; ;
form.combobox2.dbItemID := -1;
end;
Please have a sample file?
Hello Gilberto_Schiavinatto
Something like this ?
JB
Ok jean.brezhoneg / tcoton , thanks.
Hi administrators that the possibility of including this option in "Action for the button"
Hello Gilberto, Jean, Thierry,
As Gilberto suggests, a button action to SAVE but also stay on the form and clear all fields ready for the next record to be entered would by useful.
I currently clear my forms in the same way as suggested by Thierry and Jean.
What I also do by script is, after having cleared the fields, add the option to 'repeat' the previous field value by using a reserved character (the '=' is an obvious choice but anything can be used). Why? Using Jean's example, you may have 10 different books by the same author so you don't want to retype the author every time.
I also change the field label after the first 'SAVE' to remind the User of this option (I have some very forgetful users!).
I have used Jean's example (thanks, Jean) to show how I do this.
Hope it helps.
Derek.
Hello Gilberto and Derek
To answer Gilbrto's wish having possibility to aswer by Yes or No for a new entry,
here is my script to do that.
From Derek's proposal to use same author when entering many books from one author, I use a comboBox
It's true Dmitry could embed this fonction Yes or No directly into MVD
JB
My Visual Database → General → After saving to clear the form?
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi