Field changes per senario

  • Thread starter Thread starter ReggieRegister
  • Start date Start date
R

ReggieRegister

I have a text field on a report that either gets its data from the result of
8 different scenarios
4 pertain to country, all pertain to a true or false result via check box,
and all pertain to value of a third control
I have tried writing 8 different If/Endif statements – this did not work
EG: IF ([country]=US And [check88]=true and [total]<30) Then…

I tried stepped statements
EG:
If [country] Like "canada" Then
If [total] < 40 Then
If [check88] = False Then
[myField] = "40"
Else
[myField] = [total]
End If
End If
Else
If [total] < 30 And [Check88] = False Then
[myField] = "30"
Else
[myField] = [total]
End If
End If

None of these worked – any suggestions?
 
I would probably start by creating a lookup table to store the country and
myField values. You could then add this table to your report's record source
and join the country fields. Use the values of the myField and the checkbox
to calculate the value to display in myfield.
 
Back
Top