Visual Basic 6.0,错误“对象变量或未设置块变量”的问题 [英] Visual basic 6.0 ,problem of error "object variable or with block variable not set"
问题描述
我是sanjay,我创建了一个数据库名称"stud"。和表格"费用"在它。
表"费用"
属性:第一个 秒
第三
值: 200
250 300
现在我为" stud "设置连接字符串和"费用"的记录集没关系。
我创建了一个表单名称"form1" 。我拿了一个" label1" 在其中,
" adodc1" 强>控制。我在表单加载事件上编写了以下代码:
Private Sub Form_Load()
    Dim x
    x = Adodc1.Recordset.Fields(" second")。值
    打印x
结束子
我认为它会在装载时 form1上打印 ue 250,但是我得到错误"对象变量或未设置块变量"错误"91"
所以请帮助我
Plz完成你的变量的定义 -
Dim x As Variable
PS:这里微软不支持VB6,这里发送你的线程:
hi i am sanjay i created a database name "stud" and a table "fee" in it.
table "fee"
attributes: first second third
values: 200 250 300 now i set connection string for "stud" and recordset for "fee" which is ok.
i created a form name"form1" . i took a "label1" in it and a "adodc1" control. i wrote coding on form load event as:
Private Sub Form_Load()Dim x
x = Adodc1.Recordset.Fields("second").Value
Print x
End Sub
I thought it will print value 250 on the form1 at the time of its loading but i got en error "object variable or with block variable not set" error "91"
so please help me
Plz complete the defination of ur variable——
Dim x As Variable
PS:VB6 isn't supported here by Microsoft, plz send ur threads here:
这篇关于Visual Basic 6.0,错误“对象变量或未设置块变量”的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!