How do I know what 'mode' (add. edit etc) a form is in from VB code?

  • Thread starter Thread starter Isis
  • Start date Start date
I

Isis

If I am running code to do some stuff - how do I test what sort of action
is being performed on a form - IE is this a brand new form being filled out
or is it an existing one being edited.

Thanks
 
it's not the *form* that is "brand new" or "existing", it's the *record*.
use an If statement in your code to check the form's NewRecord property, as

If Me.NewRecord Then
' do some "new record" stuff
Else
' do some "existing record" stuff
End If

hth
 

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

Back
Top