Normal Topic Array Index Overflow (Read 530 times)
wildwood
Full Member
***
Offline


No personal text

Posts: 156
Location: New York
Joined: Apr 2nd, 2004
Array Index Overflow
Aug 30th, 2013 at 5:43pm
Print Post Print Post  
I have an application which I have used for many, many years. I copy the application and merely change the title to the new year. I delete all the records of the previous year and enter the new records as they come in.
I had to make one small change on one of the databases:
I added a new element/field. Everything works well except when I try and do a Merge Print. I get the following error message:
"Array Index Overflow"
and then:
"Error: A runtime SBASIC error has occurred. Please close this form repair the condition before continuing"
I have no clue as to how to fix this.

Any help would be great.

Peter
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Array Index Overflow
Reply #1 - Aug 30th, 2013 at 7:33pm
Print Post Print Post  
Hello Peter,

In your Word Merge programming you'll probably see quite a few lines that look something like this, but with different numbers in them

Code
Select All
field[25] = "ElementName" 



Up above that you will see something like

Code
Select All
Var field as Array[25] of String 



You will need to increase the number that appears in the declaration line(that is the one that starts with Var) to the highest number that is used. So you'll probably just need to increase it by one.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
wildwood
Full Member
***
Offline


No personal text

Posts: 156
Location: New York
Joined: Apr 2nd, 2004
Re: Array Index Overflow
Reply #2 - Sep 1st, 2013 at 2:59pm
Print Post Print Post  
Perfect!!
I had 24 elements originally and when I added a new element/field it put me over (thus the error message). So as per your suggestion I increased it to 26 and bingo!!

As always many thanks Ray!
Peter
  
Back to top
 
IP Logged