I am working on Windows7, with MS Access 2010, on an app written in MS Access 2003.
I am trying to populate a ListView and I'm getting a "Error 13, Type Mismatch" error.
This is my code:
For intCount1 = 1 To intTotCount
If IsNumeric(rs(0).Value) Then
' Set NewLine = ListView0.ListItems.Add(, , Str(rs(0).Value))
Set NewLine = ListView0.ListItems.Add(, , rs(0).Value)
If IsNumeric(rs(0).Value) Then
' Set NewLine = ListView0.ListItems.Add(, , Str(rs(0).Value))
Set NewLine = ListView0.ListItems.Add(, , rs(0).Value)
(Fails on line above and throws error. Value is a number.)
Else
Set NewLine = ListView0.ListItems.Add(, , rs(0).Name)
End If
For intCount2 = 1 To rs.Fields.Count - 1
NewLine.SubItems(intCount2) = rs(intCount2).Value
Next intCount2
rs.MoveNext
Next intCount1
Else
Set NewLine = ListView0.ListItems.Add(, , rs(0).Name)
End If
For intCount2 = 1 To rs.Fields.Count - 1
NewLine.SubItems(intCount2) = rs(intCount2).Value
Next intCount2
rs.MoveNext
Next intCount1
I have looked at this long I am blank!
Thank you for your help.
--
Patricia Mapes
--
Patricia Mapes
__._,_.___
| Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (1) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar