Private Sub Command1_Click()
  'onnstr = "provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=2543;Persist Security Info=False;Data Source=" + App.Path + "\sale.mdb"
   Dim connCoder As ADODB.Connection
   Dim rsCoder As ADODB.Recordset
   SQLCoder = "select * from allStorage where number='" & Trim(Text1(0).Text) & "'"
   connCoder.ConnectionString = "provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=2543;Persist Security Info=False;Data Source=" + App.Path + "\sale.mdb"
   connCoder.Open
   rsCoder.Open SQLCoder, connCoder, 3, 3
   If rsCoder.EOF Then
      answer = MsgBox("数据库中没有该商品信息!", 16, "华庭自选商场")
      For i = 0 To 4
          Text1(i).Text = ""
      Next i
      Text1(0).SetFocus
   Else
      rsCoder("price") = CCur(Text1(3).Text)
      rsCoder.Update
      rsCoder.Close
      Set rsCoder = Nothing
      connCoder.Close
      Set connCoder = Nothing
      For i = 0 To 4
          Text1(i).Text = ""
      Next i
      Text1(0).SetFocus
  End If
End Sub错误:对象变量或with块变量没设置
原来是调用公共过程来连接的,连接成功,但是后来出错了
我变成丈二和尚了