Access novice needs help! I am sure there is a way to do this. I am wanting to open a form (docmd.openform) where I see only those parent records which has a matching child record. In plain english I am wanting to see only those students [student info] who have come in for an advising appointment [student advising]
My two tables are [student info] and [student advising].
Tables are related in a one [student info] to many [student advising] relationship. Both tables are linked on field [student id]
[Advising Appointment] form has a subform (the many side of the relationship) of [Student Advising subform]
This is what I have tried so far to no avail-
Private Sub Command1_Click()
On Error GoTo SearchRout_Err
‘the check box (check20) gets checked if I want to see only students who have been in for advising
If Check20 = True Then
DoCmd.OpenForm "Advising Appointment", acNormal, "", "[Student Advising subform]![Student Advising]![Student ID] Is Not Null"
Else
DoCmd.OpenForm "Advising Appointment", acNormal, ""
End If
SearchRout_Exit:
Exit Sub
SearchRout_Err:
MsgBox Error$
Resume SearchRout_Exit
End Sub