D
DS
'm running this code but the Subform "PaymentSubform" won't Requery.
It say that its not supported. I need the Subform to reQuery so that
the Calculated control [PaySum] on the Subform recalculates and the
record is saved.
Thanks
DS
Private Sub Command2_Click()
On Error GoTo Err_Command2_Click
Forms!MoneyOrderPay.Visible = False
Forms!Payment.Visible = True
DoCmd.GoToControl "PaymentSubform"
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.GoToRecord , "", acNewRec
Forms!Payment.[PaymentSubform]![PaymentTypeID] = 10
Forms!Payment.[PaymentSubform]![PaymentAmount] =
Forms!MoneyOrderPay!Text5
Forms!Payment.[PaymentSubform]![DocID] = Forms!MoneyOrderPay!Text0
DoCmd.Close acForm, "MoneyOrderPay"
Forms!Payment.PaymentSubform.Requery
Exit_Command2_Click:
Exit Sub
Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click
End Sub
It say that its not supported. I need the Subform to reQuery so that
the Calculated control [PaySum] on the Subform recalculates and the
record is saved.
Thanks
DS
Private Sub Command2_Click()
On Error GoTo Err_Command2_Click
Forms!MoneyOrderPay.Visible = False
Forms!Payment.Visible = True
DoCmd.GoToControl "PaymentSubform"
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.GoToRecord , "", acNewRec
Forms!Payment.[PaymentSubform]![PaymentTypeID] = 10
Forms!Payment.[PaymentSubform]![PaymentAmount] =
Forms!MoneyOrderPay!Text5
Forms!Payment.[PaymentSubform]![DocID] = Forms!MoneyOrderPay!Text0
DoCmd.Close acForm, "MoneyOrderPay"
Forms!Payment.PaymentSubform.Requery
Exit_Command2_Click:
Exit Sub
Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click
End Sub