这似乎很简单但我在执行以下vba语句时遇到错误:
Dim currentmth As String
currentmth = Sheets("Data").Range("f3") ----this stores the month name
strSql = "SELECT count(Emails_Submitted) As Total FROM tablename WHERE Emails_Submitted > 1 '" & tc_mth = currentmth & "'"
cn.Open strConnection
Set rs = cn.Execute(strSql)
countfrmdb = rs.Fields(0)
cellref = countfrmdb
错误消息:无效的sql语句