我不断收到此错误:
BOF or EOF set tu True, or the current record has been deleted. The requested
operation requires a current record.
我的代码:
MyQuery = "Select Destinataire, SUM(" & Entete & ") AS NombreTotal FROM [Feuil1$] " _
& "WHERE [DateMad] Between #" _
& Format(date_deb, "yyyy/mm/dd") _
& "# And #" & Format(date_fin, "yyyy/mm/dd") & "#" & Query3 & " Group By Destinataire"
objRecordSet.Open MyQuery, objConnection, adOpenStatic, adLockOptimistic
Feuil3.Cells(1, Col) = Entete
Feuil3.Cells(strLine, 2) = Entete2
Feuil3.Cells(2, Col).Value = objRecordSet.Fields("NombreTotal").Value
我在最后一行得到错误
Feuil3.Cells(2, Col).Value = objRecordSet.Fields("NombreTotal").Value
为什么它问我 BOF 或 EOF,因为我问的是 SUM?还有如何让这个查询工作?我无法呼吸这个调试