Calculated DSUM Field

  • Thread starter Thread starter Ann Marie
  • Start date Start date
A

Ann Marie

I have two fields that are calculated with the DSUM
function: Field1 is totals hours used from Table1 and
Field2 is totals hours used from Table2.

I want to add these two fields together, so I created a
new calculate field: TotalHours = Field1 + Field2. The
problem I'm having is that TotalHours will not update
until after I have closed out of the database and re-
entered. I have tried refreshing...and that will not work.

Also, I tried just using one calculated field and adding
the two DSUM statements together...but that would not work
for me either.

Does anyone have any suggestions on how I might get this
to work?

Thanks!
 
-----Original Message-----
I have two fields that are calculated with the DSUM
function: Field1 is totals hours used from Table1 and
Field2 is totals hours used from Table2.

I want to add these two fields together, so I created a
new calculate field: TotalHours = Field1 + Field2. The
problem I'm having is that TotalHours will not update
until after I have closed out of the database and re-
entered. I have tried refreshing...and that will not work.

Also, I tried just using one calculated field and adding
the two DSUM statements together...but that would not work
for me either.

Does anyone have any suggestions on how I might get this
to work?

Thanks!
.
Hi Anne Marie,

You haven't mentioned the event that triggers the
calculation.

Is it moving from one record to another? Use the
form_oncurrent event for the calculation.

Is it during/after data entry on current record? after the
calculations have you tried me.recalc to have the form
recalculate? You may also need to force the save of the
record before the calculations. RunCommand accmdSaveRecord.

Luck
Jonathan
 
Thanks so much! The problem: I didn't have the
calculation on an event - just in a field on the form!!!
 
Back
Top