View Full Version : Declaring Array -Urgent
| HI to All
I got irretation to work with arrays.
Because While running the folling code I got the Error message Subscript OutOfRange. How do I solve this?
Dim MyArr()
For I=1 to 5
ReDim Preserve MyArr(I,2)
MyArr(I,0)="No"
MyArr(I,1)="Name"
MyArr(I,2)="Amount"
Next
Please Help me |
You can only use preserve when you are changing the last dimension - not the first. What are you trying to accomplish ?
| Hi
I have a routine like calulating the State,City,county,Other Taxes. It has some calculation with some other Fields.
Once the Calculation has finished I need to Insert the Records In Mytable Like // AutoNum, AcNo,State,City,County,Other //. In this case
if i insert in forLoop every state,city.... will insert diff rows Like
AutoNo,Acno,State,0,0,0
But I need the Row to Insert All Taxes.
Because of this I am just trying to insert into Array and then inserting. |
I would use a programmatically created recordset and not an array. This is a recordset that is not tied to a database but rather fields you create dynamically and can manipulate like a recordset. It also gives you many more options to handle the data since methods already exist.
Let me know if you need further assistance.
Good luck.
vBulletin v3.5.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.