1,216
社区成员
发帖
与我相关
我的任务
分享
For i = 1 To rst.RecordCount
LV1.ListItems.Add i, , rst.Fields("Lot") & vbNullString
With LV1.ListItems(i)
.SubItems(1) = rst.Fields("1") & vbNullString
.SubItems(2) = rst.Fields("2") & vbNullString
.SubItems(3) = rst.Fields("3") & vbNullString
End With
rst.MoveNext
'If rst.EOF Then Exit For '去掉
Next i
.SubItems(1) = rst.Fields("1") & vbNullString '1是字段名? 如果是序号,不需要双引号且序号从0开始
.SubItems(2) = rst.Fields("2") & vbNullString
.SubItems(3) = rst.Fields("3") & vbNullString
select * from dangqian where lot='13' and 字段2>0 and 字段3 is not null