'dirty' question

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

Guest

greetings

I know that when a record is saved the dirty property is set to False, but
does setting the dirty property to false save the record?
 
In
Marshall Barton said:
Normally, it's a good idea to check if the record needs to
be saved.

If Me.Dirty Then Me.Dirty = False

I do that, too, but as far as I can tell, it just shaves some
infinitesimal amount of time off the statement if the form happens not
to be Dirty.
 
greetings

I know that when a record is saved the dirty property is set to False, but
does setting the dirty property to false save the record?

Yes. I'll often use a snippet like

If Me.Dirty Then
Me.Dirty = False
End If

to force a save.

John W. Vinson [MVP]
 
Becky said:
I know that when a record is saved the dirty property is set to False, but
does setting the dirty property to false save the record?


Yes.

Normally, it's a good idea to check if the record needs to
be saved.

If Me.Dirty Then Me.Dirty = False
 
Dirk said:
I do that, too, but as far as I can tell, it just shaves some
infinitesimal amount of time off the statement if the form happens not
to be Dirty.


I was wondering about that. Don't have time to set up
whatever experiments would be needed to verify that the
record isn't saved even when it's not dirty. Probably a
Before/AfterUpdate MsgBox would ... That's too easy to avoid
with the no time excuse. OK, the BeforeUpdate doesn't fire
unless the current record really is dirty and I can't
imagine any other side effect. Gotta have a little faith
that the developer that added the dirty = false feature
would do a decent job. Thanks for the kick in the butt Dirk
;-)
 
Back
Top