You can check the value of the DataEntry property.
If you open a form with acFormEdit, it will be False
If you open a form with acFormAdd, it will be True
So
If Me.DataEntry = True Then
'Do stuff form acFormAdd
Else
'Do stuff for acFormEdit
End If

Signature
Dave Hargis, Microsoft Access MVP
> I have a form that has an "On Open" event and the problem with the event is
> that when the form is opened with DataMode=acFormEdit I get a run-time error
[quoted text clipped - 4 lines]
> opened so that I can separate out the code that is giving me the problems to
> only run when DataMode=acFormAdd?