datasource问题!!!
小弟做了一小程序,想在一个版面实现单条浏览和添加功能。
故,text1--text6的datafield 和 datasource都分别连接好了.
但这样一来在text中输入数据就不行了.
所以就想用一个check来判断当前是否添加数据.
如果是就:
If Check1.Value = True Then
Text1.DataSource = " "
Text1.DataField = " "
Text2.DataSource = " "
Text2.DataField = " "
Text3.DataSource = " "
Text3.DataField = " "
Text4.DataSource = " "
Text4.DataField = " "
Text5.DataSource = " "
Text5.DataField = " "
Text6.DataSource = " "
Text6.DataField = " "
End If
但运行程序后,选择了,check出现错误::未找到方法或数据成员
错误指向,Text1.DataSource = " "
屏蔽Text1.DataSource = " "后
同样错误又指向:Text2.DataSource = " "
望大虾指点问题出在那里....
[解决办法]
Set Text1.DataSource = Nothing