请哥哥们给我看一段代码,谢谢了
Private cs As adodb.Connection
Private rstu As adodb.Recordset
Option Explicit
Private Sub add_Click()
xuehao(0).Text = " "
xingming(1).Text = " "
xingbie(2).Text = " "
banji(3).Text = " "
dianhua(4).Text = " "
chushengriqi(5).Text = " "
dizhi(6).Text = " "
rstu.MoveLast
End Sub
Private Sub exit_Click()
Unload Me
End Sub
其中rstu.MoveLast不能运行啊???说什么对象变量或with块变量未设置,请高手帮我解决一下,谢谢了.我是才开始学VB的,请大哥们多多指教,我对很多东西还不是很理解.谢谢了!
[解决办法]
rstu的连接代码在哪里?
[解决办法]
rstu 没有给SET 或者OPEN吧!
[解决办法]
数据库都没连上,当然不能MOVELAST了
[解决办法]
cs和rstu都没有set
或者实例化:dim cs as new adodb.connection
dim rstu as new adodb.recordset