歌词中有oh~my love:对象变量或with块变量未设置 在vb程序设计中,出现这个问题是为什么啊

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/30 19:55:37
我今天没有带我的设计,没办法给出代码,如果有人知道,我明天就把代码带过来!谢谢了!
Dim ssql As String

ssql = "select * from 密码表 where usname= '" & Trim(Text1.Text) & "'"
Adodc1.RecordSource = ssql
Adodc1.Refresh

If Not Adodc1.Recordset.EOF Then

If MsgBox("是否删除?", vbYesNo) = vbYes Then
Adodc1.Recordset.Delete
MsgBox "删除成功!", vbOKOnly + vbExclamation, "信息"
Text1.Text = ""
Else

Text1.Text = ""
End If
Else
MsgBox "无此用户名!"
Text1.SetFocus
Text1.Text = ""
End If

这是我的程序 就是出现了这样的问题·

没有定义好变量吧
例如:使用Birthday.year时,没有定义Birthday结构
另外:可能是圆点前没有变量名。
如:.year=1999
.month=1
应改为:
With Birthday
.year=1999
.month=1
End With

可能是变量没被初始化

没有结束
例如:
with form1
.height=111
.width=222
end with