sos!十万火急啊!明天之前要出程序啊!请大家帮忙!

解决方案 »

  1.   

    rs2.Open cbsql1,??? , adOpenDynamic, adLockBatchOptimistic???的地方的ADO连接变量呢?
      

  2.   

    paste the error message,please.
    I guess you should,
    First,make sure the SQL sentence is correct,method:
       debug in vb,put breakpoin in "rs2.Open cbsql1, , adOpenDynamic, adLockBatchOptimistic",and then query the "cbsql1" in immediately window.
    check is it right? or execute the sentence in VB->addin->visual data manager,make sure it is right.Second,make sure the database connect is active.
      

  3.   

    should be:
    cbsql1 = cbsql1 + " and 区册号='" + Trim(Text2.Text) + "' and year(日期)='" + Trim(Combo1(0).Text) + "' and month(日期)='" + Trim(Combo1(1).Text) & "'"