Forum Discussion

Tony2021's avatar
Tony2021
Iron Contributor
Oct 03, 2024
Solved

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 reta...
  • arnel_gp's avatar
    Oct 03, 2024

    Tony2021 check if it IsNull()

     

    Private Sub Form_BeforeInsert(Cancel As Integer)

           If NOT IsNull(Me.OpenArgs) Then

               Me.txtPrjIDfk = Split(Me.OpenArgs, ";")(0)

          Else

              'do another thing

         End If
    End Sub

Resources