?
Solved

Variable uses and automation type not supported in visual basic

Posted on 2015-02-12
8
Medium Priority
?
79 Views
Last Modified: 2015-02-16
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?
0
Comment
Question by:Bob Schneider
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 49

Expert Comment

by:Martin Liss
ID: 40607043
Can you post your workbook?
0
 

Author Comment

by:Bob Schneider
ID: 40607080
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()
    Else
        ReDim RawReads(4, 0)
    End If
    rs.Close
    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

0
 
LVL 49

Accepted Solution

by:
Martin Liss earned 2000 total points
ID: 40607108
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?
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 49

Assisted Solution

by:Martin Liss
Martin Liss earned 2000 total points
ID: 40607121
In Access could you convert the problem field to some other type before you try to add the data to the listbox?
0
 

Author Comment

by:Bob Schneider
ID: 40607828
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.
0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 40608034
I think I will just change the data type.
That's what I was suggesting in my previous post.
0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 40612211
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
0
 

Author Comment

by:Bob Schneider
ID: 40612256
I will look at that.  Thanks so much!!!
0

Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question