Do While Not r.EOF
Set itmx = ListView1.ListItems.Add
itmx.Text = Trim(r!InNO)
itmx.Tag = r!idd
itmx.SubItems(1) = Trim(r!Size)
itmx.SubItems(2) = r!QTY
itmx.SubItems(3) = IIf(IsNull(r!cwfph), "", Trim(r!cwfph))
itmx.SubItems(4) = IIf(IsNull(r!cwsize), Trim(r!Size), Trim(r!cwsize))
itmx.SubItems(5) = IIf(IsNull(r!cwqty), Trim(r!QTY), Trim(r!cwqty))
itmx.SubItems(6) = IIf(IsNull(r!cwprice), 0, Trim(r!cwprice))
itmx.SubItems(7) = Trim(r!jsr)
itmx.SubItems(8) = Format(r!Rq, "yyyy-MM-dd")
If Trim(itmx.SubItems(3)) <> "" Then
itmx.Bold = True
itmx.ListSubItems(1).Bold = True
itmx.ListSubItems(2).Bold = True
itmx.ListSubItems(3).Bold = True
itmx.ListSubItems(4).Bold = True
itmx.ListSubItems(5).Bold = True
itmx.ListSubItems(6).Bold = True
itmx.ListSubItems(7).Bold = True
itmx.ListSubItems(8).Bold = True
Else
itmx.ForeColor = QBColor(12)
itmx.ListSubItems(1).ForeColor = QBColor(12)
itmx.ListSubItems(2).ForeColor = QBColor(12)
itmx.ListSubItems(3).ForeColor = QBColor(12)
itmx.ListSubItems(4).ForeColor = QBColor(12)
itmx.ListSubItems(5).ForeColor = QBColor(12)
itmx.ListSubItems(6).ForeColor = QBColor(12)
itmx.ListSubItems(7).ForeColor = QBColor(12)
itmx.ListSubItems(8).ForeColor = QBColor(12)
End If
r.MoveNext
Set itmx = ListView1.ListItems.Add
itmx.Text = Trim(r!InNO)
itmx.Tag = r!idd
itmx.SubItems(1) = Trim(r!Size)
itmx.SubItems(2) = r!QTY
itmx.SubItems(3) = IIf(IsNull(r!cwfph), "", Trim(r!cwfph))
itmx.SubItems(4) = IIf(IsNull(r!cwsize), Trim(r!Size), Trim(r!cwsize))
itmx.SubItems(5) = IIf(IsNull(r!cwqty), Trim(r!QTY), Trim(r!cwqty))
itmx.SubItems(6) = IIf(IsNull(r!cwprice), 0, Trim(r!cwprice))
itmx.SubItems(7) = Trim(r!jsr)
itmx.SubItems(8) = Format(r!Rq, "yyyy-MM-dd")
If Trim(itmx.SubItems(3)) <> "" Then
itmx.Bold = True
itmx.ListSubItems(1).Bold = True
itmx.ListSubItems(2).Bold = True
itmx.ListSubItems(3).Bold = True
itmx.ListSubItems(4).Bold = True
itmx.ListSubItems(5).Bold = True
itmx.ListSubItems(6).Bold = True
itmx.ListSubItems(7).Bold = True
itmx.ListSubItems(8).Bold = True
Else
itmx.ForeColor = QBColor(12)
itmx.ListSubItems(1).ForeColor = QBColor(12)
itmx.ListSubItems(2).ForeColor = QBColor(12)
itmx.ListSubItems(3).ForeColor = QBColor(12)
itmx.ListSubItems(4).ForeColor = QBColor(12)
itmx.ListSubItems(5).ForeColor = QBColor(12)
itmx.ListSubItems(6).ForeColor = QBColor(12)
itmx.ListSubItems(7).ForeColor = QBColor(12)
itmx.ListSubItems(8).ForeColor = QBColor(12)
End If
r.MoveNext
解决方案 »
- 关于sql数据库字段中时间用作VB的条件问题,即2008-06-01 22:20:11.000,VB怎么取后面的时间。
- 谢谢指教,怎么不让键盘模拟输入读卡器手工输入卡号
- 如何数据库中的数据导入到WORD表格中相应的位置?急待回复,谢谢!
- 如何实现如下的sql查询
- VB.NET无法调用另一个窗体了-- 怪异
- 关于“不能在手动或分布事务方式下创建新的连接”的错误
- VB中怎样实现将单页TIFF文件合并为多页
- 请问用什么控件来做打印预览呢?
- 使用odbc进行查询的问题?请高手指教
- WHY....?
- KeyCode 与 KeyAscii之间的关系?
- 有做过 IISApplication(WEBClass) 或者 VB 的大哥请进。
Dim i
For i = 1 To ListView1.SelectedItem.ListSubItems.Count
ListView1.SelectedItem.ListSubItems(i).Bold = True
Next i