ka******@comcast.net via AccessMonster.com wrote:
is there an easy way to evaluate a calculated control step by step? i have a
lot of long expressions in a lot of my controls and if there's an error,
tracking it down is a PAIN. excel has a built-in function for evaluating
formulas... does access? thanks.
I don't believe so.
You can use Debug.Print but I doubt that will help you. That basically
returns the value of something. Ex:
Debug.Print Me.Text0
Instead of long expressions, you could create a function. Let's say you
have the expression
=IIF("A" = "B",True,False)
you could change the calculation to
=CompAB("A","B")
Function CompAB(strA, strB) As Boolean
If strA = strB Then CompAB = True
End Function
With the code window open, click to the right of Function CompAB. This
will put a red dot to the left of it. Now when this function is called
you can step through it and see what the values are that were passed to
the function and how they change as it is processed.