I don't have a "New" button on this form. I have "Save", "Save & New", and "Cancel".
>>On a data entry form, the client wants me to implement a "Save & New" button. This button will save the current entity being edited (or added) and add a new entity for editng without exiting the form. Some values from the current entity need to be carried over the the new entity.
>>
>>What is the best way to do this?
>
>One simple way among many; if you have a new button on the form is to call its PerformClick method
>
>
>private void btnSave_Click(object sender, EventArgs e)
>{
> base.OnClick(e);
> btnNew.PerformClick();
>}
>
>
>
>Make sure that CloseOnSave is not set to true.
>You could also easily roll your own button or subclass the mmButtonSave overiding the click event handler, calling the base click code and then add the code to perform the new. Lots of different ways depending on your need and flavor. Best way... probably depends. I would probably just roll my own as there isn't that much code to do a save and a new.
>
>Tim