If/Then ... what am I missing
You're not using a correct If/Else structure. You would find that even if
you slimmed your code down to just this:
If direct = "" Then CalPrac = "NI"
ElseIf direct = "x" Then CalPrac = "PI"
End If
it still would not compile.
You have to use a structure like this:
If direct = "" Then
CalPrac = "NI"
ElseIf direct = "x" Then
CalPrac = "PI"
End If
--
Jim
"Barb Reinhardt" wrote in message
...
|I have the following if/Then statements
|
| If affirmation = "" Then
| If indirect = "" Then
| If direct = "" Then CalPrac = "NI"
| ElseIf direct = "x" Then CalPrac = "PI"
| ElseIf direct = "w" Then CalPrac = "PI"
| ElseIf direct = "m" Then CalPrac = "NI"
| ElseIf direct = "ny" Then CalPrac = "NY"
| End If
| ElseIf indirect = "x" Then
| If direct = "" Then CalPrac = "PI"
| ElseIf direct = "x" Then CalPrac = "FI"
| ElseIf direct = "w" Then CalPrac = "LI"
| ElseIf direct = "m" Then CalPrac = "PI"
| ElseIf direct = "ny" Then CalPrac = "NY"
| End If
| ElseIf indirect = "m" Then <~~Compile error, else without if
| If direct = "" Then CalPrac = "NI"
| ElseIf direct = "x" Then CalPrac = "PI"
| ElseIf direct = "w" Then CalPrac = "PI"
| ElseIf direct = "m" Then CalPrac = "NI"
| ElseIf direct = "ny" Then CalPrac = "NY"
| End If
| End If
| ElseIf affirmation = "x" Then
| If indirect = "" Then
| If direct = "" Then CalPrac = "NI"
| ElseIf direct = "x" Then CalPrac = "FI"
| ElseIf direct = "w" Then CalPrac = "LI"
| ElseIf direct = "m" Then CalPrac = "NI"
| ElseIf direct = "ny" Then CalPrac = "NY"
| End If
| ElseIf indirect = "x" Then
| If direct = "" Then CalPrac = "PI"
| ElseIf direct = "x" Then CalPrac = "FI"
| ElseIf direct = "w" Then CalPrac = "LI"
| ElseIf direct = "m" Then CalPrac = "PI"
| ElseIf direct = "ny" Then CalPrac = "NY"
| End If
| ElseIf indirect = "m" Then
| If direct = "" Then CalPrac = "NI"
| ElseIf direct = "x" Then CalPrac = "FI"
| ElseIf direct = "w" Then CalPrac = "LI"
| ElseIf direct = "m" Then CalPrac = "NI"
| ElseIf direct = "ny" Then CalPrac = "NY"
| End If
| End If
| End If
|
|
| I've noted where the error is. I just don't see it. I'm sure another
pair
| of eyes will find it.
|
| Thanks,
| Barb Reinhardt
|