I have some seemingly simple code on the BeforeUpdate event on a form:
If (Me![TribeOrgName].Column(0) < 1000) Then
Me![InstrCategory] = "TRIBAL"
ElseIf (Me!TribeOrgName = "US EPA") Then
Me![InstrCategory] = "EPA"
ElseIf (Me!TribeOrgName = "US EPA OAQPS") Then
Me![InstrCategory] = "EPA"
Else: Me![InstrCategory] = "Other"
End If
The first and last lines are evaluated correctly. The problem is that if the Me!TribeOrgName value is in one of the "else if" lines, the InstrCategory field is still updated to "Other" (as in the "Else" line) instead of "EPA" as it should be.
Any suggestions why the ElseIf statements are not being evaluated as True?
If (Me![TribeOrgName].Column(0) < 1000) Then
Me![InstrCategory] = "TRIBAL"
ElseIf (Me!TribeOrgName = "US EPA") Then
Me![InstrCategory] = "EPA"
ElseIf (Me!TribeOrgName = "US EPA OAQPS") Then
Me![InstrCategory] = "EPA"
Else: Me![InstrCategory] = "Other"
End If
The first and last lines are evaluated correctly. The problem is that if the Me!TribeOrgName value is in one of the "else if" lines, the InstrCategory field is still updated to "Other" (as in the "Else" line) instead of "EPA" as it should be.
Any suggestions why the ElseIf statements are not being evaluated as True?