B
Brook
I have a frminvoicepaymentssubform with the following controls:
MaxPaymentDate =DLookUp("paymentdate","tblinvoicepayments","[invoiceid]=" &
[invoiceid] & "And [paymentid]=" & [MaxPaymentID])
MaxPaymentID =DMax("paymentid","tblinvoicepayments","[invoiceid]=" &
[invoiceid])
MaxAmountDue =DLookUp("amountdue","tblinvoicepayments","[invoiceid]=" &
[invoiceid] & "And [paymentid]=" & [MaxPaymentID])
I on close of the form, I want to update my tblinvocepayments fields
MaxPaymentDate and MaxPaymentAmount from the form fields:
So, tblinvocepayments PayoffDate = MaxPaymentDate
PayoffAmt = MaxAmountDue
I tried the following code in an update query, but it only updates my the
record in the table?
Begin Update Query Code:
UPDATE tblinvoicepayments SET tblinvoicepayments.MaxPmtDate =
forms!frminvoicepaymentssubform!MaxPaymentDate, tblinvoicepayments.MaxPmtAmt
= forms!frminvoicepaymentssubform!MaxAmountDue
WHERE
(((tblinvoicepayments.paymentid)=[forms]![frminvoicepaymentssubform]![paymentid]));
End Update Query Code:
Does anyone have any ideas to help me?
Thanks,
Brook
MaxPaymentDate =DLookUp("paymentdate","tblinvoicepayments","[invoiceid]=" &
[invoiceid] & "And [paymentid]=" & [MaxPaymentID])
MaxPaymentID =DMax("paymentid","tblinvoicepayments","[invoiceid]=" &
[invoiceid])
MaxAmountDue =DLookUp("amountdue","tblinvoicepayments","[invoiceid]=" &
[invoiceid] & "And [paymentid]=" & [MaxPaymentID])
I on close of the form, I want to update my tblinvocepayments fields
MaxPaymentDate and MaxPaymentAmount from the form fields:
So, tblinvocepayments PayoffDate = MaxPaymentDate
PayoffAmt = MaxAmountDue
I tried the following code in an update query, but it only updates my the
record in the table?
Begin Update Query Code:
UPDATE tblinvoicepayments SET tblinvoicepayments.MaxPmtDate =
forms!frminvoicepaymentssubform!MaxPaymentDate, tblinvoicepayments.MaxPmtAmt
= forms!frminvoicepaymentssubform!MaxAmountDue
WHERE
(((tblinvoicepayments.paymentid)=[forms]![frminvoicepaymentssubform]![paymentid]));
End Update Query Code:
Does anyone have any ideas to help me?
Thanks,
Brook