In the code below, when Form_BeforeInsert runs, it's not giving me the value that was set previously when Form_Open ran. Why not?
Yes, I realize I could OpenArgs from within Form_BeforeInsert, but I'm just learning VBA programming, and I want to understand why on God's green Earth do so many things not work like they are supposed to.Code:Option Explicit Private m_InternalJobRef As Long Private Sub Form_BeforeInsert(Cancel As Integer) MsgBox m_InternalJobRef End Sub Private Sub Form_Open(Cancel As Integer) If Not IsNull(OpenArgs) Then m_InternalJobRef = CLng(OpenArgs) MsgBox m_InternalJobRef End If End Sub