If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Field changes per senario
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? |
#2
|
|||
|
|||
Field changes per senario
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. -- Duane Hookom Microsoft Access MVP "ReggieRegister" wrote: 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? |
Thread Tools | |
Display Modes | |
|
|