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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Overflow at 51,000??

Status
Not open for further replies.

CptTom

Programmer
Jul 16, 2001
117
US
I have script that counts the number of records and sets a From 1 to lngRecordCount... But I keep getting an Overflow error. Surely it can hadle a count of 51,000, right?

Larry
 
Hmmmmmmmmmmmmmmmm,

Yes -BUT-

then that only applies to the individually declared LONG data type. If the NAME says "long" (e.g. lng), but the declaration is integer - you have an "OOPS~!" also, look at the declaration of the counter, and any usage of the 'lng' in a calc where the assignment is an int.


MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Thanks, the oops was not in the lngRecordCount, the oops was in:
Dim Progress_Amount As Integer ' This I changed to Long Also
For Progress_Amount = 1 To intRecCount

Larry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top