From: mls via AccessMonster.com on
Mike,
I did progress in running this code but again got stuck at Var1(2) & (3)..
error 3265 says item not found in this collection.. var1= a10,5245,test1,23.
45
I am expecting var1(2) test1 & var1(3)=23.45. So how can I capture these?
Thank you
Code below..
If (i > 9) Then

Temp = Mid(strline, InStr(strline, ":") + 1)
var1 = Split(Temp, ",")
mylog![sample] = var1(1)
'mylog![detect] = var1(2)
'mylog![value] = var1(3)
mylog.Update

End If
i = i + 1
Loop
mls wrote:
>I did not get a chance to try this today but will post an update when I am
>done.
>
>Thanks
>
>>If you want to use Line Input it would be something like
>>For I = 1 to 8
>[quoted text clipped - 13 lines]
>>>> That way the code "looks" like what you are importing and errors cn
>>>> be easy to spot.

--
Message posted via http://www.accessmonster.com

From: Mike Painter on
If var1= a10,5245,test1,23. 45
then it is not an array.
Use var2 or give it some meaningful name and dimension it.
Note this is zero based so the first value is YourTestArray(0)
Did you dimension var1 as shown in the sample I gave you?

mls via AccessMonster.com wrote:
> Mike,
> I did progress in running this code but again got stuck at Var1(2) &
> (3).. error 3265 says item not found in this collection.. var1=
> a10,5245,test1,23. 45
> I am expecting var1(2) test1 & var1(3)=23.45. So how can I capture
> these? Thank you
> Code below..
> If (i > 9) Then
>
> Temp = Mid(strline, InStr(strline, ":") + 1)
> var1 = Split(Temp, ",")
> mylog![sample] = var1(1)
> 'mylog![detect] = var1(2)
> 'mylog![value] = var1(3)
> mylog.Update
>
> End If
> i = i + 1
> Loop
> mls wrote:
>> I did not get a chance to try this today but will post an update
>> when I am done.
>>
>> Thanks
>>
>>> If you want to use Line Input it would be something like
>>> For I = 1 to 8
>> [quoted text clipped - 13 lines]
>>>>> That way the code "looks" like what you are importing and errors
>>>>> cn be easy to spot.


From: mls via AccessMonster.com on
This is working fine. I just forgot to add the test and value fields to the
table so I got the 3265 ERROR Message
My code is working fine to read specific cells from CSV file. Now I need to
add code to process the data.
Thanks a lot Mike.

Mike Painter wrote:
>If var1= a10,5245,test1,23. 45
>then it is not an array.
>Use var2 or give it some meaningful name and dimension it.
>Note this is zero based so the first value is YourTestArray(0)
>Did you dimension var1 as shown in the sample I gave you?
>
>> Mike,
>> I did progress in running this code but again got stuck at Var1(2) &
>[quoted text clipped - 25 lines]
>>>>>> That way the code "looks" like what you are importing and errors
>>>>>> cn be easy to spot.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201001/1