I have an array [results], that may be up to 25 cells long. I want to save the values in the cells to a new record in a table [ManyWords].
The problem is when I hard code saving the values (word0 = results(0), word1 = results(1), etc) I get a "script out of range" message as the array runs out of values. I tried the following code but the variables don't seem to be recognized;
With rstwords
.AddNew
N = 0 'Local variable
While N < UBound(result) 'result is the name of the array variable
mword = ".word" & N 'Local variable
mresult = "result(" & N & "
" 'Local variable
[mword] = [mresult] 'This line is not working
N = N + 1
Wend
.Update
End With
Does anyone know why access97 is not pulling the result() array values and saving them to the table?
Thanks in advance for any insight you can provide....
The problem is when I hard code saving the values (word0 = results(0), word1 = results(1), etc) I get a "script out of range" message as the array runs out of values. I tried the following code but the variables don't seem to be recognized;
With rstwords
.AddNew
N = 0 'Local variable
While N < UBound(result) 'result is the name of the array variable
mword = ".word" & N 'Local variable
mresult = "result(" & N & "
[mword] = [mresult] 'This line is not working
N = N + 1
Wend
.Update
End With
Does anyone know why access97 is not pulling the result() array values and saving them to the table?
Thanks in advance for any insight you can provide....