Runtime error 2427

gsc_81

Registered User.
Local time
Today, 10:07
Joined
Sep 24, 2004
Messages
30
I'm at wits end (a short trip). I have a report which delivers this error (Runtime error 2427) on only a small percentage of my records. I visually inspect the table the report is based on and the data is present and identically formatted in all cells, but for some unknown reason reports run on these records don't recognize the data and assume a null field.
Does anyone have a suggestion of what to check?
I step through the code and it errors out on the first field. I have over 19K records and so far have only found a handful that won't function.
If posting the code will help I'll put it up but I don't understand the intermittancy.
Thanks in advance for all help.
 
Hello,

Firstly you really need to base your Report on a Query and tackle the issue of "null" fields at that level. (If this is still a problem you'll need to post with more information).

Generally speaking reports themselves generate a Runtime Error 2427 when there are no records for the report to display. In fact if you go to the Immediate Window (press Ctrl+G) and type in ..

?accesserror(2427)

.. you will get the reply:

You entered an expression that has no value.@The expression may
refer to an object that has no value, such as a form, a report, or a
label control.@@1@@1


If this is the case you'll need to use the code below in the On NoData event of the report to prevent the Runtime error from occuring:

Code:
Private Sub Report_NoData(Cancel As Integer)
MsgBox "No data"
On Error Resume Next
Cancel = True
End Sub

Hope this all helps.

Rusty
:D
 
Thanks

Thanks for the response Rusty. The problem was that the field held data but it thought it was empty for some reason. It appears that God is smiling on me today as the issues seems to have corrected itself as mysteriously as it arrived. We had the issue for approxiamtely 24 hours then it healed itself. Maybe an 8 hour delay on the repair we did last evening. LOL
anyway thanks for your time.
 

Users who are viewing this thread

Back
Top Bottom