Avatar of SteveL13
Flag for United States of America

asked on 

Not allow data entry in a new record if situation already exists.

I have 3 text fields on a form.  They are txtCode, txtLastName, and txtCombined.  txtCombined puts the 1st two fields together.  So, for example, if I enter "1234" (is a text field),  in the first field and "Johnson" in the 2nd field then txtCombined displays 1234Johnson.

But if I have already entered that combination in a previous record I want to display a message to the user letting them know that combination already exists and undo the two field entries so the user can try again.

I've tried all kinds of beforeupdate and afterupdate events and oncurrent events but nothing is working.  Thoughts?
Microsoft Access

Avatar of undefined
Last Comment

8/22/2022 - Mon