R
Richard
Hi all,
I use the below code to print Dymo labels, the purpose is to print the
number of labels in the textbox TotalParcels.The code works fine on exsting
records. When I attempt to print a new record I get Run-Time Error '94'
Invalid use of Null The code highlights on this line >> For L = 1 To
Forms!frmScan!ScanSub.Form.Parcels
When I hover the mouse over the L it = 0
Thank you
Richar
------------------------------------------------------------------------------------------------
Private Sub Label5_Click()
Dim strWhere As String
Dim L As Long
If Me.Dirty Then
Me.Dirty = False
End If
If Me.NewRecord Then
MsgBox "Select a record to print"
Else
strWhere = "[ScanID] = " & Me.[ScanID]
End If
For L = 1 To Forms!frmScan!ScanSub.Form.Parcels
DoCmd.OpenReport "rptScanlogDymo", acViewNormal, , strWhere
Next L
DoCmd.GoToRecord , , acNewRec
Department.SetFocus
End Sub
I use the below code to print Dymo labels, the purpose is to print the
number of labels in the textbox TotalParcels.The code works fine on exsting
records. When I attempt to print a new record I get Run-Time Error '94'
Invalid use of Null The code highlights on this line >> For L = 1 To
Forms!frmScan!ScanSub.Form.Parcels
When I hover the mouse over the L it = 0
Thank you
Richar
------------------------------------------------------------------------------------------------
Private Sub Label5_Click()
Dim strWhere As String
Dim L As Long
If Me.Dirty Then
Me.Dirty = False
End If
If Me.NewRecord Then
MsgBox "Select a record to print"
Else
strWhere = "[ScanID] = " & Me.[ScanID]
End If
For L = 1 To Forms!frmScan!ScanSub.Form.Parcels
DoCmd.OpenReport "rptScanlogDymo", acViewNormal, , strWhere
Next L
DoCmd.GoToRecord , , acNewRec
Department.SetFocus
End Sub