How to create form check data duplicate

Hello,

How to create form check data duplicate with 3 criteria Name School and Year
popup message data duplicate or no

thanks