Any chance of using the form's AfterInsert event instead of AfterUpdate?
If not, you will need to declare a module-level boolean variable to indicate
if it was a new record, and set it in Form_BeforeUpdate.
1. In the General Declarations section of the form's module (at the top,
just after the Option statements):
Private mbWasNewRecord As Boolean
2. In Form_BeforeUpdate:
mbWasNewRecord = Me.NewRecord
3. In Form_AfterUpdate:
If mbWasNewRecord Then
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"John" <Jo**@nospam.infovis.co.ukwrote in message
news:OZ**************@TK2MSFTNGP03.phx.gbl...
>
In After Update event of form I am using the below code to distinguish
between a new record or an existing record;
If Me.NewRecord Then
......
Else
......
End If
Problem is that me.newrecord always returns zero (false) even if a new
record has been inserted. What is the problem and how can I fix it?