I am trying to ensure that the user is notified if they enter more disbursments than was allotted for a specific account. The twist is that each account will have an initial allotment and a renewal allotment. The disbursements are captured in a subform.
I entered the following code in the AfterUpdate event of the control capturing the individual disbursements, but I get Runtime error 2428 - You entered an invalid argument in a domain aggregate function.
-DisAmt is the subform control where I am entering current disbursement
-Disburse_Info is the tablename that stores the data
-DisInd is the subform control where I indicate whether the current disbursement is for the Initial or Renewal Allotment
-Forms!Caa_Info_ frm!Total_I is the main form control that displays the subform subtotal for disbursements for the initial allotment
-Forms!Caa_Info_ frm!OfferAmt is the main form control that displays the initial allotment amount.
Help!
I entered the following code in the AfterUpdate event of the control capturing the individual disbursements, but I get Runtime error 2428 - You entered an invalid argument in a domain aggregate function.
Code:
If DSum(DisAmt, Disburse_Info, DisInd = "1" & Forms!Caa_Info_frm!Total_I) + DisAmt > Forms!Caa_Info_frm!OfferAmt Then MsgBox "Initial Disbursements are greater than Initial CAA amount. Please verify data.", vbCritical, "Excess Disbursements" End If
-DisAmt is the subform control where I am entering current disbursement
-Disburse_Info is the tablename that stores the data
-DisInd is the subform control where I indicate whether the current disbursement is for the Initial or Renewal Allotment
-Forms!Caa_Info_ frm!Total_I is the main form control that displays the subform subtotal for disbursements for the initial allotment
-Forms!Caa_Info_ frm!OfferAmt is the main form control that displays the initial allotment amount.
Help!
Comment