Good one, colintis.
I just want to add some additional information:
When you write
Me.DepCity = HAM
you are comparing the VALUE of Me.DepCity to the value of the variable HAM (And since you have not declared a variable HAM, access will create an empty one for you, of type variant). Still the comparison gives no meaning. To avoid such errors in the future, ensure that you always have the line
OPTION EXPLICIT at the top of your code module.
Now, the & is a string concatation operator. It will basicly take the result of your first comparison and your second comparision and parse it to a string. For example:
- Me.DepCity = "HAM" & Me.DestCity = "PEK"
would yield:
which would concatanete into:
a string with the value "TrueTrue"
I hope that I managed to clear up some misunderstandings and not just add to the confusion.