请问LIstview空间如何连接数据库
Dim itm As ListItemPrivate Sub Form_Load()
ListView1.View = lvwIcon
With ListView1
Set itm = .ListItems.Add(, , "茉莉蜜茶")
itm.Icon = 1
Set itm = .ListItems.Add(, , "茶派")
itm.Icon = 2
Set itm = .ListItems.Add(, , "阿萨姆")
itm.Icon = 3
Set itm = .ListItems.Add(, , "雀巢咖啡")
itm.Icon = 4
Set itm = .ListItems.Add(, , "雅哈咖啡")
itm.Icon = 5
Set itm = .ListItems.Add(, , "雪碧")
itm.Icon = 6
Set itm = .ListItems.Add(, , "可乐")
itm.Icon = 7
Set itm = .ListItems.Add(, , "怡宝")
itm.Icon = 8
End With
Command1.Caption = "出 售"
Command2.Caption = "入 库"
Command3.Caption = "库 存"
Command4.Caption = "退 出"
End Sub
Private Sub ListView1_itemclick(ByVal item As MSComctlLib.ListItem)
Label1.Caption = "商品:" & item.Text
End Sub
这是我的代码
我需要实现实时更新商品的销售与入库
同时随时可以查看商品的库存
请大神们帮忙