I have form named frmLogin. In the form is a text box named LoginName where I will enter a username and a button named Login that runs a macro to hide the form in the background. I also have a table called Table1 with the field usernames. I would like to build VBA to be included in the On Click of the Login button that before it runs the macro, it will compare the text entered in the LoginName and compare it to the usernames in Table1. If the name does appear in the table, it runs the macro, if it does not appear in Table1, then it returns an error message "Username not found". What would the VBA for the Login button be?