爱问知识人 爱问教育 医院库

数据表的查询

首页

数据表的查询

   Access数据库中有个表,表有4个字段:ID、故障现象、故障特征、匹配。在文本框中输入“泵不排油”,在故障现象字段中找出泵不排油,然后使该条记录的匹配字段由0变为1,这个怎么实现?
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & App.Path & "\泵不排油.mdb;Persist Security Info=False"
    Adodc1.RecordSource = "泵不排油Rule_Con"
    Adodc1.Refresh
    If Adodc1.Recordset.Fields(1).Value = Text1.Text Then
        Set Adodc1.Recordset.Fields(3).Value = 1
    End If
最后提示错误:“要求对象”
请问问题出在哪了?

提交回答
好评回答
  • 2010-06-30 16:38:39
    if ... end if 改为:
    while Adodc1.Recordset.Fields(1).Value = Text1.Text and Adodc1.Recordset.Fields(3).Value=0
    Set Adodc1.Recordset.Fields(3).Value = 1
    Adodc1.Recordset.movenext
    wend

    兰***

    2010-06-30 16:38:39

类似问题

换一换
  • VB 相关知识

  • 电脑网络技术
  • 电脑网络

相关推荐

正在加载...

热点检索

  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 172-191
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):