How do I cancel new record

  • Thread starter Thread starter ZRexRider
  • Start date Start date
Z

ZRexRider

Hi,

I have a form with that has generated a new record its recordset when I
programmatically set an ID value.

Before the user enters other "required fields" they can click a button
that will allow them to search for other records. When they click the
"search" button I want to be abandon the "partial" new record and reset
the forms recordset to the results of the search.

My problem is, trying to change the recordset forces the current
"partial" record to be written to the DB. Since it's a partial, it
fails with an error.

I want to abandon this partial record as soon as they click the Search
button. Does anyone know of a way to do this?

Thanks
 
Check Access VB Help on the Undo method of the Form object. Something
like:

If (Me.Dirty = True) Then
Me.Undo
End If
 
Thank you Van - I was approaching from the wrong angle - I was trying
to directly effect the underlying recordset and was thinking it would
be a method of the recordset itself.

Your suggestion is obvious now that I see it.

Thank You Very Much
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top