Think about when you want it to happen. You need it to happen when the user clicks the button, so obviously it has to go in the button's Click event handler, which I already stated in my previous post. Now, do you think you should test the fields before or after saving the record to the database? Not much point doing it after is there? You check the fields and if one is empty then you display the error message, otherwise you save the record.