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 / May 2008

Tip: Looking for answers? Try searching our database.

New record or  not Dirty

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
forcefield - 13 May 2008 02:58 GMT
Hi,
I have many fields text and combo bound and unbound in a form. Is there a
situation where the form has a new record and yet dirty or any other
unexpected possibilities. I always think that when a form is new it is
invariably not dirty. I am not sure if this is true always.

In my case I would only use this condition
If  myform is not dirty Then …. or  If  IsNewRecord = true Then  …. There is
no need to test other combinations  like If myform is not dirty and
IsnewRecord = true then …. Or any other combinations.

If other possibilities exist then can someone give me a situation where such
an event can occur.

Thanks
Douglas J. Steele - 13 May 2008 13:27 GMT
The new record isn't dirty until you start providing values for the fields
in it. (Remember that a record is New until it's saved.)

To check whether the current record is dirty, you use Me.Dirty.

To check whether the current record is new, you use Me.NewRecord

You could use

 If Me.Dirty = False Or Me.NewRecord = True Then
...
 End If

but I'm not sure of the point of the check for NewRecord.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Hi,
> I have many fields text and combo bound and unbound in a form. Is there a
[quoted text clipped - 13 lines]
>
> Thanks
 
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.