M
MB
Okay, I give up. I can't figure it out. I wrote in a previous post my
dilemma of having a field that add all costs (see original post below). I
was told to change my table and use the Dsum function.
I cannot change the table (I have to live with how it’s set up) and I just
cannot get the DSum to work.
Could you please help by providing the correct expression for DSum?
Here's the original post:
I have a program to track courses taken by our employees. The main form
includes employee name, position, employee number, etc. A subform (called
tblCoursesSubform2) consists of the name of the course and associate costs
(cost, travel, motel, meals, misc).
There is a text box (TotalAllCosts) with the following control source:
=Nz([Cost],0)+Nz([TravelCost],0)+Nz([MotelCost],0)+Nz([MealCost],0)+Nz([MiscCost],0)
I need to have another text box that will add the TotalAllCosts amount to
the last record added.
In other words, the last record has $1,200 in the TotalAllCosts box. When I
add a new record where the TotalAllCosts for that record is, say, $1,000, I
need a box (called TotalToDate) that will show $2,200 (total spent for that
employee to date).
Thank you so much for your help.
dilemma of having a field that add all costs (see original post below). I
was told to change my table and use the Dsum function.
I cannot change the table (I have to live with how it’s set up) and I just
cannot get the DSum to work.
Could you please help by providing the correct expression for DSum?
Here's the original post:
I have a program to track courses taken by our employees. The main form
includes employee name, position, employee number, etc. A subform (called
tblCoursesSubform2) consists of the name of the course and associate costs
(cost, travel, motel, meals, misc).
There is a text box (TotalAllCosts) with the following control source:
=Nz([Cost],0)+Nz([TravelCost],0)+Nz([MotelCost],0)+Nz([MealCost],0)+Nz([MiscCost],0)
I need to have another text box that will add the TotalAllCosts amount to
the last record added.
In other words, the last record has $1,200 in the TotalAllCosts box. When I
add a new record where the TotalAllCosts for that record is, say, $1,000, I
need a box (called TotalToDate) that will show $2,200 (total spent for that
employee to date).
Thank you so much for your help.