Saving the current record

M

mscertified

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.
 
M

Michel Walsh

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
 

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

Top