I have a form that I would like to create a custom warning in. If a field contains a specific value (which is based off of a drop down list linked to a parent table), then I would like the warning I create to pop up. Here is what I tried using in VBA, with no success. It keeps highlighting the first line in yellow, and I do not know how to correct that error. I don't even know what it means when it does that. I am very new to Access - please use small words. "VendorCode" is the field, "CLOSET" is the specific item from the drop down list that I need to trigger a warning. TIA
Private Sub VendorCode_GotFocus()
IIf [VendorCode] = "CLOSET", "WARNING!! Needs Additional Paperwork - Please see notes."
End Sub