I have two with the main being "Category" and the other "Category1". If I populate both forms it prints fine. The issue is when I populate the "Category" form only "Category1" still prints. Can any one help? Thanks..
Private Sub Print_Click()
On Error GoTo Err_Print_Click
DoCmd.OpenReport "Category", acPrint, , "[PO#] = '" & [Forms]![Category]![PO Number] & "'"
If DCount("[PO#]", "CATEGORY1", "[PO#] = '" & [Forms]![Category]![PO Number] & "'") > 0 Then
DoCmd.OpenReport "Category1", acPrint, , "[PO#] = '" & [Forms]![Category]![PO Number] & "'"
End If
Exit_Print_Click:
Exit Sub
Err_Print_Click:
MsgBox Err.Description
Resume Exit_Print_Click
End Sub