Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

overflow error on comparison in report

Status
Not open for further replies.

joebloeonthego

Technical User
Mar 7, 2003
212
CA
I have a report printing out information about orders. I would like to only show the orders that were late, but still count all orders for the totals. I have added the following code to the Detail onFormat:

Me.Detail.Visible = Me.otcount <> 1

with otcount being 1 for on time, or 0 for late.

This works fine, for 10 or so days of data, but once I run the report with 15 days or more, I get:

run-time error '57452':
overflow

(and it is definitely pointing to 'Me.otcount <> 1')

I can't find reference to this number anywhere.
Certainly I'm doing something fairly standard? I need to run the report with 1-2 months worth of data.
Any help would be greatly appreciated,
Thanx.
 
Is there a possibility the value may be Null? If so, try:
Me.Detail.Visible = Nz(Me.otcount,0) <> 1

Duane
MS Access MVP
 
now I get:
Run-time error '-2147352567 (80020009)':
Overflow

hmmm... interesting..
 
I don't think this is causing your error. Do you still get the error if you remove this line of code?

I usually cancel the printing of the section rather than setting its visible property to false.

Duane
MS Access MVP
 
You were right, except it wasn't a null, it was an #error in the otcount field in just one order on the 11th. Sorry, I should've caught that, I checked for it, but must have missed it before.
thanx!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top