RichO
Registered Yoozer
- Local time
- Yesterday, 18:19
- Joined
- Jan 14, 2004
- Messages
- 1,036
Well, I swear I have done this before with a report but I can't seem to figure it out now.
I have a report with a field (txtAmount) containing a condition such as:
=IIf([MyField]="Bob", 100, 50)
In the report footer I want to sum this field but =Sum([txtAmount]) doesn't work.
I tried using VBA in the format property of the detail section
total = total + txtAmount
or
total = total + IIf([MyField]="Bob", 100, 50)
but both of these result in an error "You entered an expression that has no value".
It sounds so simple but I can't figure it out. Any help would be appreciated. Thanks.
I have a report with a field (txtAmount) containing a condition such as:
=IIf([MyField]="Bob", 100, 50)
In the report footer I want to sum this field but =Sum([txtAmount]) doesn't work.
I tried using VBA in the format property of the detail section
total = total + txtAmount
or
total = total + IIf([MyField]="Bob", 100, 50)
but both of these result in an error "You entered an expression that has no value".
It sounds so simple but I can't figure it out. Any help would be appreciated. Thanks.