Denis,
Thanks for your assistance. Please note that I have cinsert ommands as per
your instructions but I get : Run-time error'2465' Microsoft Access cant'
find field"" referred to in your expression.
Following might assist you in finding the error.
I have a form Expense Report by Company with a subform Employees Subform. In
the Employees Subform are the Fields: ExpenseItemAmount , ExpenseItemCredit
and the CheckBox.
Filtering on EmployeesID open another Form Expense Reports with Subform
Expense Reports Subform filtered on ExpenseDetailsID. The form Expense
Reports has the CheckBox and the control box named "BalanceDue". The Expense
Reports Subform has Fields ExpenseItemAmount & ExpenseItemCredit.
Trying to update the On Current Event of all these Fors & Subforms and the
AftreUpdate event of the relevant fields in the forms the exist I get the
above error.
All above seems too complicate. I hope that is cleared.
The CheckBox that appears in both subform & form is bound to a field "Paid"
in a table "Expense Reports" though the other two fields are in the table
"Expenses Paid"
Dennis said:
In the forms On Current event and in the after update event of any fields
that can affect the calculation, put this code
If BalanceDue = 0 then
CheckBoxName = True
Else
CheckBoxName = False
End if
reterrig said:
In a form I have a control box named "BalanceDue" with Control source
"(=nz([Expense Totals])-nz([Total Credit])" that sums up two other calculated
control boxes
I have also a check box (Yes/No).
I need the check box to be updated automatically. In case the "BalanceDue"
is Zero then ckeck box to be "Yes", If any other amount, positive or
negative, then the check box to be "No"