The "new query" button is simply to add a new record. I only want add a new
record without the last record being cleared.
> >I have a subform which has some required fields. I have been informed that a
> >way to get out of the subform when a record has been partially created is to
[quoted text clipped - 18 lines]
> scott@takemeout_infotrakker.com
> www.infotrakker.com
>The "new query" button is simply to add a new record. I only want add a new
>record without the last record being cleared.
By "cleared", do you mean that the record isn't saved? Or that the record IS saved, but the data you've entered is
cleared when you add a new record.
If the first, then there's a problem with your code; for eg, if you're issuing a Me.Undo before saving, this would
invalidate the record and NOT save your data.
If you're trying to carry data over from one record to the next, then you'd need to store the current data somewhere
(perhaps Form level variables) and then use that stored data to auto-fill the new record.
>> >I have a subform which has some required fields. I have been informed that a
>> >way to get out of the subform when a record has been partially created is to
[quoted text clipped - 18 lines]
>> scott@takemeout_infotrakker.com
>> www.infotrakker.com
Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
scubadiver - 20 Jun 2007 13:57 GMT
Sorry if I haven't been clear enough.
If a record has been started and then not wanted I want it to be cleared
(remember there are required fields). Or if all the fields are entered I do
want the record to be saved.
> >The "new query" button is simply to add a new record. I only want add a new
> >record without the last record being cleared.
[quoted text clipped - 34 lines]
> scott@takemeout_infotrakker.com
> www.infotrakker.com
Rick Brandt - 20 Jun 2007 14:26 GMT
> Sorry if I haven't been clear enough.
>
> If a record has been started and then not wanted I want it to be
> cleared (remember there are required fields). Or if all the fields
> are entered I do want the record to be saved.
If the user does not fill out required fields then the record will not be
saved (sort of the point of required fields). Have you set these fields as
required in your table's design?

Signature
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
scubadiver - 20 Jun 2007 14:17 GMT
I think I've sorted it out. I put me.undo in a second command button instead
of the form's before update event.
Sorry!
> >The "new query" button is simply to add a new record. I only want add a new
> >record without the last record being cleared.
[quoted text clipped - 34 lines]
> scott@takemeout_infotrakker.com
> www.infotrakker.com