Variable uses and automation type not supported in visual basic

I am trying to write records to a vb list box and one field is of the "time" variable type.  I get the error message indicated in the post title even when I try to write it as CStr(value).  Any ideas?
Bob SchneiderCo-OwnerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

Martin LissConnect With a Mentor Older than dirtCommented:
Does it work if you don't try to add that field?

Why are you using a listbox with "coulmms" created with tabs rather than a listview or some type of grid?
Martin LissOlder than dirtCommented:
Can you post your workbook?
Bob SchneiderCo-OwnerAuthor Commented:
Here is my code:
    Set rs = New ADODB.Recordset
    sql = "SELECT Bib, Chip, Time, Reader, Antenna FROM RawRFID WHERE EventID = " & lEventID
    rs.Open sql, conn, 1, 2
    If rs.RecordCount > 0 Then
        RawReads = rs.GetRows()
        ReDim RawReads(4, 0)
    End If
    Set rs = Nothing
    For i = 0 To UBound(RawReads, 2)
        lstRawData.AddItem i + 1 & vbTab & RawReads(0, i) & vbTab & RawReads(1, i) & vbTab & RawReads(2, i) & vbTab & RawReads(3, i) & vbTab & RawReads(4, i)
    Next i

Open in new window

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

Martin LissConnect With a Mentor Older than dirtCommented:
In Access could you convert the problem field to some other type before you try to add the data to the listbox?
Bob SchneiderCo-OwnerAuthor Commented:
The problem is that, as I write it to the array, I can't transfer it to the list box even if I convert it to a string.  I think I will just change the data type.  I don't think it needs to be Time necessarily.  I will leave this open in the event someone has a better solution.
Martin LissOlder than dirtCommented:
I think I will just change the data type.
That's what I was suggesting in my previous post.
Martin LissOlder than dirtCommented:
I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014
Bob SchneiderCo-OwnerAuthor Commented:
I will look at that.  Thanks so much!!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.