Access Runtime Error 2427

  • Thread starter Thread starter Shawgod
  • Start date Start date
S

Shawgod

I Run a report everyday that takes a query and data in a table and
converts it to a report. The Report has run every day without
problems. I checked the data and see no problems in the data. I also
made sure the Querys are running correctly, they all are fine. here is
the code I have for this part that it is erroring out on.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

If Me.[Pct Sold] > 0.1799 Then
Me.Check47 = True
Else
Me.Check47 = False
End If

End Sub

It is erroring out on the If ME. [pct sold] statement. Any help would
be good.

Thanks
 
Is [Pct Sold] a control on the report or just a field in its underlying
recordset? With reports, unlike forms, you cannot refer to a field in the
recordset in the report's module, only to a control in the report. If this
is not a control in the report add a control bound to the field to its detail
section and set its Visible property to True (Yes in the properties sheet) to
hide it. You'll then be able to refer to it in code.

Ken Sheridan
Stafford, England
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top