gbnorton
asked on
Access DLookup produces runtime error 2471
Hi,
this routine fails with runtime error 2471. What might be wrong?
Thanks,
Brooks
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
Stop
DoCmd.OpenReport "Glassing Furnace Diode Label", acViewNormal, , "[ID]=" & Me.ID
Else
Stop
DoCmd.OpenReport "Glassing Furnace Chip Label", acViewNormal, , "[ID]=" & Me.ID
End If
End Sub
this routine fails with runtime error 2471. What might be wrong?
Thanks,
Brooks
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
Stop
DoCmd.OpenReport "Glassing Furnace Diode Label", acViewNormal, , "[ID]=" & Me.ID
Else
Stop
DoCmd.OpenReport "Glassing Furnace Chip Label", acViewNormal, , "[ID]=" & Me.ID
End If
End Sub
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Brooks