A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

New record or not Dirty



 
 
Thread Tools Display Modes
  #1  
Old May 13th, 2008, 02:58 AM posted to microsoft.public.access.forms
forcefield via AccessMonster.com
external usenet poster
 
Posts: 10
Default New record or not Dirty

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

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200805/1

  #2  
Old May 13th, 2008, 01:27 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default New record or not Dirty

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.

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


"forcefield via AccessMonster.com" u14819@uwe wrote in message
news:8411712c861f1@uwe...
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

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200805/1



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:28 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.