Evaluation timing

  • Thread starter Thread starter ChrisJ
  • Start date Start date
C

ChrisJ

I have a textbox on a form with a control source like

=iif(Test, Value, value)

It works just fine in Access 2003, but fails to evaluate in Access 2007

Can someone tell me why, or even what event (presumably form level) is
supposed to evaluate these types of expression
 
1. iif works in Access2007
2. There can easily be senerios where a form field that is calculated takes
a long time to evaluate. Where in earlier versions of Access
you did not see this issue as much. Try moving as much to the query that
drives the form as possible.

If you see "Calculating..." at the bottom wait until that stops to see if
the =iif field is updated.

General guesses,
Mark
 
More details:
The text boxes are located on the child of a "parent-child-grandchild"
nesting.
The set of forms is used for receiving payments.
The parent holds details of the number of credit cards to be processed and
the total value
The child handles the payment from an individual card
The grandchild handles the allocation of the payment over multiple line items.
The problem text boxes show the difference between the totals to be
processed and those currently processed, using a variety of sources
(references to other text boxes, DSums on the underlying work tables etc) and
functions to ensure empty stings return zero.

In 2007, the values never change from the intial value of zero, which means
the whole process falls over as you are prevented from moving to the next
payment until the current payment completes.

As I said, this works just fine in 2003.
As a work-around, I have moved the code from the control definition to the
child "current" event, and this works well.

I was just trying to understand why this should be happening as the
application has many more instances of this coding practice, and it would be
good to be able to estimate the size of the problem I'm facing

Chris
 
Back
Top