Open Form when OpenArgs is Null
Hello Experts,
I usually open a form with OpenArgs but I now want to be able to open the form on its own (not from another form) and add a record without using the OpenArgs. I still need to retain the OpenArgs functionality though when I do open the form from another form and using OpenArgs.
I currently get an “Invalid Use of Null” error 94 when I try to open the form on its own.
How would I modify the below if OpenArgs is Null?
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.txtPrjIDfk = Split(Me.OpenArgs, “;”)(0)
End Sub
here is the error on the form. I get it when I try to add a new record and OpenArgs are Null (its says 0 in below and I assume that is Null).
thank you
Hello Experts, I usually open a form with OpenArgs but I now want to be able to open the form on its own (not from another form) and add a record without using the OpenArgs. I still need to retain the OpenArgs functionality though when I do open the form from another form and using OpenArgs. I currently get an “Invalid Use of Null” error 94 when I try to open the form on its own. How would I modify the below if OpenArgs is Null? Private Sub Form_BeforeInsert(Cancel As Integer) Me.txtPrjIDfk = Split(Me.OpenArgs, “;”)(0)End Sub here is the error on the form. I get it when I try to add a new record and OpenArgs are Null (its says 0 in below and I assume that is Null). thank you Read More