C
Chuck Chopp
I have a form that is opened in "add" mode to add a new record into a
database. This has been working just fine w/o any problems. There is a
data validation routine that gets called when the form is closed and it
takes care of calculating some additional field values that get set in the
record before it is committed to the database.
Now, I would like to put a button on the form that does a "Save & New" such
that it runs the data validation subroutine, saves the record and then
clears the contents of the form and leaves it in a condition where it is
ready to have a new record's field values entered into it again. I would
like to do this w/o having to close the form and re-open the form again.
I tried the following in an event procedure for a button on the form:
Me.Recordset.Update
Me.Recordset.AddNew
Unfortunately, this closes the form [saves the data, too] and does not allow
me to keep the form open for additional data entry tasks.
How do I implement a "Save & New" type of button on my form?
TIA,
Chuck
--
Chuck Chopp
ChuckChopp (at) rtfmcsi (dot) com http://www.rtfmcsi.com
RTFM Consulting Services Inc. 864 801 2795 voice & voicemail
103 Autumn Hill Road 864 801 2774 fax
Greer, SC 29651
Do not send me unsolicited commercial email.
database. This has been working just fine w/o any problems. There is a
data validation routine that gets called when the form is closed and it
takes care of calculating some additional field values that get set in the
record before it is committed to the database.
Now, I would like to put a button on the form that does a "Save & New" such
that it runs the data validation subroutine, saves the record and then
clears the contents of the form and leaves it in a condition where it is
ready to have a new record's field values entered into it again. I would
like to do this w/o having to close the form and re-open the form again.
I tried the following in an event procedure for a button on the form:
Me.Recordset.Update
Me.Recordset.AddNew
Unfortunately, this closes the form [saves the data, too] and does not allow
me to keep the form open for additional data entry tasks.
How do I implement a "Save & New" type of button on my form?
TIA,
Chuck
--
Chuck Chopp
ChuckChopp (at) rtfmcsi (dot) com http://www.rtfmcsi.com
RTFM Consulting Services Inc. 864 801 2795 voice & voicemail
103 Autumn Hill Road 864 801 2774 fax
Greer, SC 29651
Do not send me unsolicited commercial email.