New record or not Dirty

  • Thread starter forcefield via AccessMonster.com
  • Start date
F

forcefield via AccessMonster.com

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
 
D

Douglas J. Steele

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.
 

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