L
Lauren B
I'm attempting to write an "If...Then" statement and am encountering a
syntax error.
In the AfterUpdate property for the field "STATE," I am writing a code that
will automatically populate the field "DISTRICT." The districts are
predefined - for example, Distict 1 consists of CT, MA, ME, and NH. Thus, I
would like my code to populate the field "DISTRICT" with the text "District
1" for any entries in the states of CT, MA, ME, or NH. I've tried the
following code:
If STATE = "CT" Or "MA" Or "ME" Or "NH" Then
DISTRICT = "District 1"
End If
I am getting a syntax error on the "CT" Or "MA" Or "ME" Or "NH" portion of
the statement. How can I code the multiple criteria correctly?
Thank you in advance for any assistance.
LB
syntax error.
In the AfterUpdate property for the field "STATE," I am writing a code that
will automatically populate the field "DISTRICT." The districts are
predefined - for example, Distict 1 consists of CT, MA, ME, and NH. Thus, I
would like my code to populate the field "DISTRICT" with the text "District
1" for any entries in the states of CT, MA, ME, or NH. I've tried the
following code:
If STATE = "CT" Or "MA" Or "ME" Or "NH" Then
DISTRICT = "District 1"
End If
I am getting a syntax error on the "CT" Or "MA" Or "ME" Or "NH" portion of
the statement. How can I code the multiple criteria correctly?
Thank you in advance for any assistance.
LB