我一直在坚持下去 运行时错误'3265':
此系列中找不到物品 对于rstAnswers(“20GBRank”)= irank,而它在其他数据库中工作。
我做错了什么?我该如何解决?
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
答案 0 :(得分:2)
只需确保在您收到错误的数据库中存在字段(列) 20GRank 。