我一直不斷收到 運行時錯誤「3265」中發現的。VBA項目不在此集合
我在做什麼錯?我該如何解決它?
Option Compare Database
Option Explicit
Public Function Update20BldgRank()
Dim db As Database
Dim rstAnswers As Recordset
Dim i As Integer
Dim irank As Integer
irank = 1
Set db = CurrentDb()
Set rstAnswers = db.OpenRecordset("Top20Genbld13", dbOpenDynaset)
rstAnswers.MoveFirst
Do Until rstAnswers.EOF
rstAnswers.Edit
rstAnswers("20GBRank") = irank
rstAnswers.Update
rstAnswers.MoveNext
irank = irank + 1
Loop
rstAnswers.Close
Update20BldgRank = irank - 1
End Function
我更新了代碼,這裏是圖片http://i.imgur.com/LEph4GP.png – Lan
rstAnswers(「20GRank」)現在是rstAnswers(「20GBRank」) – Lan