listview显示数据时出现380无效的属性值
Set addlist = lvgcms.ListItems.Add(, , Trim(Rs.Fields("故障单号")))
addlist.SubItems(1) = Trim(Rs.Fields("开始时间"))
addlist.SubItems(2) = Trim(Rs.Fields("结束时间"))
addlist.SubItems(3) = Trim(Rs.Fields("过程描述"))
addlist.SubItems(4) = Trim(Rs.Fields("状态"))
Rs.MoveNext
开始时间 这句开始出错,注释掉后,下面的几句也出错,数据在数据库中是有的。以前也显示正常的。
[解决办法]
Set addlist = lvgcms.ListItems.Add(, , Trim(Rs.Fields("故障单号")) & "")
addlist.SubItems(1) = Trim(Rs.Fields("开始时间") & "")
addlist.SubItems(2) = Trim(Rs.Fields("结束时间") & "")
addlist.SubItems(3) = Trim(Rs.Fields("过程描述") & "")
addlist.SubItems(4) = Trim(Rs.Fields("状态") & "")
Rs.MoveNext