I am attempting to make 2 lines visible in on a report based upon if a yes/no field is selected in a table. I am using a DLookup to do this and I am receiving "Runtime error '2471':
The expression you entered as a query parameter produced this error: 'stFillerID'"
Here is the exact code I am using
Private Sub GroupFooter2_Print(Cancel As Integer, PrintCount As Integer)
Dim stCertNeeded As Boolean
Dim stFillerID As Long
stFillerID = Me.FillerOrderLineID
stCertNeeded = DLookup("[CertRequired]", "tblFillerMetalOrderDetails", "[FillerOrderLineID] = stFillerID")
If stCertNeeded = False Then
Me.Line1.Visible = True
Me.Line2.Visible = True
Else
Me.Line1.Visible = False
Me.Line2.Visible = False
End If
Debug.Print stCertNeeded
End Sub