2015-12-18 42 views
0

我想顯示記錄根據選定的一天組合框cmbday單擊event.Please幫助我如何獲得一個整數值,我得到一個錯誤:數據類型不匹配在條件表達式VB6錯誤:在標準表達式中的數據類型不匹配SQL

Private Sub cmbday_Click() 
     Adodc1.RecordSource = "select * from patientEntry where day= '" & cmbDay & "'" 
     Adodc1.Refresh 
    End Sub 
+0

cmbDay有什麼價值?調試打印它以確保其正確。 「日」列是什麼數據類型? –

回答

0

嘗試用CInt(cmbDay)

假設你在cmbDay但作爲一個字符串獲得一個數字值替換cmbDay

I tried posting this as a comment, but I dont have enough reputation to post a comment and hence I have posted this as an answer

相關問題