Subforms and requery

  • Thread starter Thread starter Christopher
  • Start date Start date
C

Christopher

Hi,

I am getting round in circles with this one, a little help
will be very appreciated:

I have a main form (Employees), which has 2 different
subforms:
Sub 1 (Absence): which records employees' absences.
Sub 1 (Holidays left): 1 field (TotalRem)which calculates
the number of holidays left, after having entered the
holidays in Sub 1.
(The TotalRem field is a field that calculates a value
from the Employee table minus a value in the Absence
Table, it was created as an expression in a query).

The system is fine and the claculations are all ok, but I
would like to know how I could have the TotalRem field be
updated without having to come out of the current employee
abscence records and come back to it in order to refresh
it.

I have used the Requery function before for combo boxes,
but never with 1 main form and 2 subforms, both placed on
the main form.

Thank you for your help,
Chris.
 
You could use the AfterUpdate event of Sub1 to run the Recalc method for the
main form.

Ragnar
 
Back
Top