Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2007

Tip: Looking for answers? Try searching our database.

'dirty' question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Becky - 20 Mar 2007 18:27 GMT
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?
Marshall Barton - 20 Mar 2007 20:37 GMT
>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

Signature

Marsh
MVP [MS Access]

Dirk Goldgar - 20 Mar 2007 20:49 GMT
> 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.

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Marshall Barton - 20 Mar 2007 23:35 GMT
>> Normally, it's a good idea to check if the record needs to
>> be saved.
[quoted text clipped - 4 lines]
>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
;-)
--
Marsh
John W. Vinson - 20 Mar 2007 20:59 GMT
>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]
mlkiser - 20 Jun 2007 20:43 GMT
Excuse the very "newbish" nature of this question. If I have a form that I
want to update my table immediately upon any action taken, such as a checkbox
being checked or unchecked, is this the snipet I would use? And, if so, under
what action would I place the event? I tried using it with from events, but
that doesn't seem to fire it. Does it need to be placed under each checkbox's
event procedure?

>>greetings
>>
[quoted text clipped - 10 lines]
>
>             John W. Vinson [MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.