troubleshooting Question

Access DLookup produces runtime error 2471

Avatar of gbnorton
gbnortonFlag for United States of America asked on
Microsoft Access
2 Comments1 Solution1230 ViewsLast Modified:
this routine fails with runtime error 2471.  What might be wrong?

Private Sub Print_Label_Click()
    Dim strPartNumber As String
    Dim strExists As Integer
    strPartNumber = Me.cboPN
    ' This section sees if part number is axial leaded or chip
    ' See if the diode part number exists in the diodes table
    ' If it is an axial leaded part use Glassing Furnace Diode Label
    ' If it is a chip use Glassing Furnace Chip Label
    strExists = DCount("[P_Number]", "Diodes", "[P_Number] = strPartNumber")
    If strExists <> 0 Then
        DoCmd.OpenReport "Glassing Furnace Diode Label", acViewNormal, , "[ID]=" & Me.ID
        DoCmd.OpenReport "Glassing Furnace Chip Label", acViewNormal, , "[ID]=" & Me.ID
    End If
End Sub

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros