VB 中查询数据并在Label 中显示,怎么实现?

2025-03-23 08:03:37
推荐回答(2个)
回答1:

label1.caption= ADODC1.Recordset.Fields(第几个字段,从0开始)
'例如 查询之后 想显示第二个字段的结果 Fields() 中 则填写 数字1

希望可以帮到你。

回答2:

for i=1 to adodc1.recordset.RecordCount '将所有结果显示
s= ADODC1.Recordset.Fields("货名") & ADODC1.Recordset.Fields([字段名]) & _
chr(13) & chr(10)
label1.caption=label1.caption & s
next i