I have created a custom dll that fires from a Custom POS Button. I have been able to pass a reference of the QSRules object to a Public Sub on a Form and within the Form been able to access some of the properties and methods of the QSRules. My question is how can I now make the Ref to the QSRules available to a command button. When I fire an event from the Form the Object is nolonger pointing the the SessionClass. Am I close with this or completely out to lunch?
'Entry point fired by Custom POS Button Public Function Process(mySession As Object) As Boolean Process = True Dim s As New Form1 s.Session mySession End Function
' form1 Dim m_QSRules As SessionClass
Private Sub Command1_DblClick() 'This Does not fire, throws error MsgBox m_QSRules.Cashier.Name End Sub
Public Sub Session(ByRef NewSession As SessionClass) Set m_QSRules = NewSession If m_QSRules Is Nothing Then MsgBox "didn't work" Else 'THIS fires successfully everytime MsgBox m_QSRules.Cashier.Name End If End Sub
John