I am trying to change the text to unbound text box dependant on a condition of a field on the report.
So on open if the base is STN the text will be STN's address and if it is LTN then it is LTN address.
I have written some code that adds the address to the box dependant on base, but i get the error message
Compile error:
end if without block if.
Code:
Private Sub Report_Open(Cancel As Integer)
If Me.Base = "STN" Then Me.Address = "STN address here"
End If
End Sub
Once i have got this bit working i will go on to add...
Else If me.Base = "LTN" then me.address = "LTN Address here"
Can anyone explain the error message for me?
So on open if the base is STN the text will be STN's address and if it is LTN then it is LTN address.
I have written some code that adds the address to the box dependant on base, but i get the error message
Compile error:
end if without block if.
Code:
Private Sub Report_Open(Cancel As Integer)
If Me.Base = "STN" Then Me.Address = "STN address here"
End If
End Sub
Once i have got this bit working i will go on to add...
Else If me.Base = "LTN" then me.address = "LTN Address here"
Can anyone explain the error message for me?