Is this a query question or a form question? The solutions are different. For
instance, there is no way for a query to trigger a message box, while vba code
could be used to display a message box using form events or using control events.
In the query, you could display a calculated field when the two fields were not equal.