VB程序制作:将text1文本框换成Combo1,运行时提示:实时错误'340',控件数组元素(1)不存在
Subview_data()'定义显示数据的过程IfAdodc1.Recordset.RecordCount>0ThenWithAdodc1.RecordsetFori=...
Sub view_data() '定义显示数据的过程
If Adodc1.Recordset.RecordCount > 0 Then
With Adodc1.Recordset
For i = 0 To Text1.UBound
If .Fields(i) <> "" Then Text1(i) = .Fields(i) Else Text1(i) = ""
Next i
Set picPhoto.DataSource = Adodc1
picPhoto.DataField = "照片"
If .Fields("照片") Is Nothing Then
picPhoto.Picture = LoadPicture()
End If
End With
End If
End Sub
调试时:提示该条Then Text1(i) = .Fields(i) Else有问题 展开
If Adodc1.Recordset.RecordCount > 0 Then
With Adodc1.Recordset
For i = 0 To Text1.UBound
If .Fields(i) <> "" Then Text1(i) = .Fields(i) Else Text1(i) = ""
Next i
Set picPhoto.DataSource = Adodc1
picPhoto.DataField = "照片"
If .Fields("照片") Is Nothing Then
picPhoto.Picture = LoadPicture()
End If
End With
End If
End Sub
调试时:提示该条Then Text1(i) = .Fields(i) Else有问题 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询