I have a macro that I've copied straight off the microsoft website. The code checks the invoice number entered on a form to see if it already exists in the underlying table, thus to avoid duplication. The macro is called by the "before update" event of the invoice number. I have tried to modifty this code to look at 2 fields, that is the invoice number AND the supplier name. All fields are text fields.
Attached the first bit that works. This is placed under the "condition" column on the macro design screen, having MSGBOX as the action.
And i've tried to add the 2nd field but this is no longer doing any validation. I've also moved the macro to the supplier name "before update" event, as the invoice number gets entered first.