This could just be a syntax problem. When my main form loads I want a popup form to open if a query returns any results. I'm not sure how to call the query properly.
Private Sub Form_Open(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
subfrmFutureLoans.Requery
subfrmCurrentLoans.Requery
If qryOverdue Is Not Null Then
stDocName = "frmOverdue"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
Private Sub Form_Open(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
subfrmFutureLoans.Requery
subfrmCurrentLoans.Requery
If qryOverdue Is Not Null Then
stDocName = "frmOverdue"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub