main form and popup


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
 
Ad

Advertisements

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 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top