E
ELC
I'm sure I'm forgetting something completely idiotic, but I'm (brand) new to
coding and am trying to use if...then statements to auto-fill subsequent
records after a user makes a selection from a combobox. I have created the
below code, but when I try to execute, I get an error message: "Compile
Error: End if without block if". When I check the definition, I get the
following "Identifier under cursor is not recognized."
Private Sub District_AfterUpdate()
Me.Visible = True
Dim District As String
Me.District.AfterUpdate = District
If Me!District = "Daytona Beach" Then Me!JCCAdd = "444 Seabreeze Blvd, Ste
450"
If Me!District = "Fort Lauderdale" Then Me!JCCAdd = "4500 N State Road 7,
Ste 200"
If Me!District = "Fort Myers" Then Me!JCCAdd = "2080 McGregor Blvd, 3rd Floor"
If Me!District = "Gainesville" Then Me!JCCAdd = "1809 Art Museum Dr, Ste 200"
End If
End Sub
I just can't quite see what I'm missing but hopefully a couple new sets of
eyes can help!! Thank you in advance for any assistance!!
coding and am trying to use if...then statements to auto-fill subsequent
records after a user makes a selection from a combobox. I have created the
below code, but when I try to execute, I get an error message: "Compile
Error: End if without block if". When I check the definition, I get the
following "Identifier under cursor is not recognized."
Private Sub District_AfterUpdate()
Me.Visible = True
Dim District As String
Me.District.AfterUpdate = District
If Me!District = "Daytona Beach" Then Me!JCCAdd = "444 Seabreeze Blvd, Ste
450"
If Me!District = "Fort Lauderdale" Then Me!JCCAdd = "4500 N State Road 7,
Ste 200"
If Me!District = "Fort Myers" Then Me!JCCAdd = "2080 McGregor Blvd, 3rd Floor"
If Me!District = "Gainesville" Then Me!JCCAdd = "1809 Art Museum Dr, Ste 200"
End If
End Sub
I just can't quite see what I'm missing but hopefully a couple new sets of
eyes can help!! Thank you in advance for any assistance!!