Avatar of SteveL13
SteveL13
Flag for United States of America

asked on 

How warn user that a default employee already exists

I have a checkbox on a subform named "DefaultEmployee" (chkbxDefaultEmployee).  The Main Form is named frmCompanies (tblCompanies).  The sub-form is named subfrmCompanyEmployees (tblCompanyEmployees).  If a company employee is already flagged as the default employee for the company shown on the main form I want a message box to appear that tells the user that "A default employee named thedefaultemployeename already exists."

In other words only one default employee can exist per company.  Of course there will be many companies so the rule has to be per company.

What would the code be for this afterupdate event of the checkbox.  Or should it be for the beforeupdate event?
Microsoft Access

Avatar of undefined
Last Comment
SteveL13

8/22/2022 - Mon