N
Noel
Hi. I have a form with a Command Button whose On Click
Event is as follows. This is designed to open another
form where the School ID for the currently viewed School
record is the same as that in tblMentorSBTSchool. At
present this opens a blank form where no corresponding
SchoolID exists in tblMentorSBTSchool. What code could I
add that would instead bring up a message such as No
Mentor/SBT Record Exists For This School. Thanks, Noel
Private Sub Mentors_Click()
On Error GoTo Err_Mentors_Click
DoCmd.OpenForm "frmMentorsAndSBTs", , , "MentorID IN
(SELECT MentorID FROM tblMentorSBTSchool WHERE
tblMentorSBTSchool.SchoolID=" & SchoolID & ")"
Exit_Mentors_Click:
Exit Sub
Err_Mentors_Click:
MsgBox Err.Description
Resume Exit_Mentors_Click
End Sub
Event is as follows. This is designed to open another
form where the School ID for the currently viewed School
record is the same as that in tblMentorSBTSchool. At
present this opens a blank form where no corresponding
SchoolID exists in tblMentorSBTSchool. What code could I
add that would instead bring up a message such as No
Mentor/SBT Record Exists For This School. Thanks, Noel
Private Sub Mentors_Click()
On Error GoTo Err_Mentors_Click
DoCmd.OpenForm "frmMentorsAndSBTs", , , "MentorID IN
(SELECT MentorID FROM tblMentorSBTSchool WHERE
tblMentorSBTSchool.SchoolID=" & SchoolID & ")"
Exit_Mentors_Click:
Exit Sub
Err_Mentors_Click:
MsgBox Err.Description
Resume Exit_Mentors_Click
End Sub