Saving the current record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm diagnosing a problem with a database. It is using this code to save the
current record on a form:

DoCmd.Echo False
x = GotoRecord("Previous")
y = GotoRecord("Next")
DoCmd.Echo True

Is there a better way to do this? It seems that sometimes the record is not
being saved. Obviously if the record is the first or only record this code
will fail, but I don't think that is happening here.
 
Yes.

Me.Dirty = false


will (try to) save the record. If the record cannot be saved, because a
required field is not supplied, because there would be a duplicated value in
a column not allowing it, etc. then the record won't be saved.



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top