NewRecord property

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

I'm trying to use the NewRecord property in Acc 97 to
determine whether or not I'm on a new record when the form
is being closed. However, when I close the form,
regardless of whether or not I'm on a new record, the
NewRecord property is always false. I tried using the
recordset clone and boomarking it to the current record,
but this didn't seem to work either.

Any ideas about why it may not be working?

Thanks in advance,

Jason
 
Jason,

Could you please post back with the code you are using. At the moment
you haven't given enough information.

- Steve Schapel, Microsoft Access MVP
 
This is undoubtledly because the new record has been saved before the form
is closed. A "new record", once saved, is no longer a "new record".
NewRecord only makes sense in "pre-save" events like Form_BeforeUpdate.

HTH,
TC
 
I was using the form's On Close event, but from TC's post
this is probably not a good one to use.

Let me explain what I'd like to do. I have a form, frmNCM,
from which the user can open another related form, frmCAR.
I would like to know whether or not the user has entered
in information so that I can let the orginal form know.

For example, sometimes the user will open up the 2nd form
to enter in a record. I want to mark the original for to
indicate that this has been done. This is easy enough,
however sometimes the user may not enter information on
the second form, or sometimes they may enter info but then
delete it. If they do either one of these I'd like to
remove the mark on the orginal form so I know that no
information has been entered onto the second one.

Any ideas?

Thank you,

Jason
 
That's why I asked.

Form_Close Event is too late and NewRec is always false by this stage.

You can remove the mark when the 2nd Form is being opened and use the (2nd
Form) Form_AfterUpdate Event (something has been updated into the Table) to
put the mark back.
 
Back
Top