J
Joan
Hi,
I get a run-time error when I run the report, rptInvoiceStatement, that
states: "
Run-time error '2455: You entered an expression that has an invalid
reference to the property Form/Report." When I debugg, the following line
is highlighted: adj= nnz(me![rptInvoiceAdjustments].Report!txtAdjTot) = 0.
Nnz is a user defined function that checks to see if a sub-report's total is
a number, ( that there are in fact any records in the subreport).Following
is the code that the line above is in:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
' See if there is any data in the InvoiceAdjustments subreport. If there
is, show the total textbox and it's label on the main report. If it isn't,
only the Pay textbox and accompaning label are shown.
Dim adj As Boolean
adj = nnz(Me![InvoiceAdjustments].Report!txtAdjTot) = 0
If adj Then
Me!Line135.Visible = False
Me!lblTotal.Visible = False
Me!txtTotal.Visible = False
Else
Me!Line135.Visible = True
Me!lblTotal.Visible = True
Me!txtTotal.Visible = True
End If
End Sub
An invoice statement with adjustments would have a "Total" textbox which
totals the other two subreports and a "Pay" textbox which totals all three
subreports. An invoice statement without adjustments should only have a
"Pay" textbox and label.
I don't get this message on my machine at home when I link to sample data in
a different back-end database. But when I use the client's back-end
database data on my machine, I get the same run-time error. What could this
possibly mean?
Joan
I get a run-time error when I run the report, rptInvoiceStatement, that
states: "
Run-time error '2455: You entered an expression that has an invalid
reference to the property Form/Report." When I debugg, the following line
is highlighted: adj= nnz(me![rptInvoiceAdjustments].Report!txtAdjTot) = 0.
Nnz is a user defined function that checks to see if a sub-report's total is
a number, ( that there are in fact any records in the subreport).Following
is the code that the line above is in:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
' See if there is any data in the InvoiceAdjustments subreport. If there
is, show the total textbox and it's label on the main report. If it isn't,
only the Pay textbox and accompaning label are shown.
Dim adj As Boolean
adj = nnz(Me![InvoiceAdjustments].Report!txtAdjTot) = 0
If adj Then
Me!Line135.Visible = False
Me!lblTotal.Visible = False
Me!txtTotal.Visible = False
Else
Me!Line135.Visible = True
Me!lblTotal.Visible = True
Me!txtTotal.Visible = True
End If
End Sub
An invoice statement with adjustments would have a "Total" textbox which
totals the other two subreports and a "Pay" textbox which totals all three
subreports. An invoice statement without adjustments should only have a
"Pay" textbox and label.
I don't get this message on my machine at home when I link to sample data in
a different back-end database. But when I use the client's back-end
database data on my machine, I get the same run-time error. What could this
possibly mean?
Joan