I use this code to open a form if the query qryOverdue returns records. Use the dcount function to count the number of records returned by the query. If there are any then form is opened, else nothing happens.
Private Sub Form_Open(Cancel As Integer)
Dim count As Integer
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmOverdue"
count = DCount("ID", "qryOverdue")
If count > 0 Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End Sub