I was a bit confusing but it is for the same form. I have the form "Locker Information" that has "Location,type,lockernumber,studentID,and Studentname" fields. When I enter the studentID I need it to check two things:
1)check to see if the studentID exist in the StudentInformation table, if not show a msg box "student doesn't exist in StudentInformation table" then open the StudentInformation table so the student can be added. This is the code you provided in your previous posting
2)I need it to check the LockerInformation table and if a record already exist with the same StudentID then show a msg box "student is already assigned a locker" then clear StudentIDtxtbox
1)check to see if the studentID exist in the StudentInformation table, if not show a msg box "student doesn't exist in StudentInformation table" then open the StudentInformation table so the student can be added. This is the code you provided in your previous posting
2)I need it to check the LockerInformation table and if a record already exist with the same StudentID then show a msg box "student is already assigned a locker" then clear StudentIDtxtbox