Hi,
I have a muti-dimension array and would like to init it everytime a form is load?
do I have to loop through it like below or quicker way to do
For i=1 to 2000
array(i).field1 = ""
array(i).field2 = ""
next i
Thanks!
Printable View
Hi,
I have a muti-dimension array and would like to init it everytime a form is load?
do I have to loop through it like below or quicker way to do
For i=1 to 2000
array(i).field1 = ""
array(i).field2 = ""
next i
Thanks!
If you use arrays of variable dimension (and the ReDim statement) you can erase them after they've been used.Quote:
Originally Posted by mapperkids
See if this works for you:
VB Code:
Erase array
...and keep in mind that the array is already initialized during the form load with each cell set to its default value (where strings = "" and numbers = 0)
If you to initialize it again after the form load, I second SI's suggestion to use ERASE ARRAY (if the array is static) or REDIM ARRAY if it is dynamic...