main form and popup

  • Thread starter Thread starter John
  • Start date Start date
J

John

I have a main form with a status button on it. The status button
works fine and does what it is to do. Part of it is opening a popup
form (modal, popup). On the popup is a SEND button. The code for it
is below. On the mainform is a txtbox for status. In the code below
is a call to a change status routine. This ChangeStatus is on the
main form and is used alot there so it needs to stay as part of the
main form. How can I call it from the SEND button of the popup?

Private Sub cmdRequestApprovalSend_Click()

Dim sql As String

sql = "POSendApprovalRequest " & Forms![Purchase Orders].PONumber
& ", '" & txtRequestApprovalDescription & "' "
Call RunSQLServerStoredProcedure(sql)

DoCmd.Close

Call ChangeStatus(PO_STATUS_REQUEST_APPROVAL_SENT)

End Sub


Thanks....John
 
I have a main form with a status button on it.  The status button
works fine and does what it is to do.  Part of it is opening a popup
form (modal, popup).  On the popup is a SEND button.  The code for it
is below.  On the mainform is a txtbox for status.  In the code below
is a call to a change status routine.  This ChangeStatus is on the
main form and is used alot there so it needs to stay as part of the
main form.  How can I call it from the SEND button of the popup?

Private Sub cmdRequestApprovalSend_Click()

    Dim sql As String

    sql = "POSendApprovalRequest " & Forms![Purchase Orders].PONumber
& ", '" & txtRequestApprovalDescription & "' "
    Call RunSQLServerStoredProcedure(sql)

    DoCmd.Close

    Call ChangeStatus(PO_STATUS_REQUEST_APPROVAL_SENT)

End Sub

Thanks....John



I might have gotten it working right. I used Call Forms("Purchase
Orders").ChangeStatus(PO_STATUS_REQUEST_APPROVAL_SENT) and it seems to
be working like it should. If you read this and think otherwise, feel
free to let me know.
Thanks...John
 
Back
Top