How to know what is the action?

  • Thread starter Thread starter Nuno Gomes
  • Start date Start date
N

Nuno Gomes

Hello,

I need help. I thing is simple...

I have a form with some code in form_before_update to validate some entries.

One of the validation is test the duplication in the key field.

My problem is that message appears allways when i change my record.
There's something way to test what action the access is making?
So if the action is change record, i don't test the duplication of key
field...

Hope you understand..


Thank you,
 
Only perform the check for duplicates when you are entering a new record:

Private Function Form_BeforeUpdate(Cancel As Integer)

If Me.NewRecord Then
'Check for duplicates code goes here
End If
 
Back
Top