谁帮我解决此问题,一定高分悬赏。
ListView1中明明我已经选择了好几项,为什么只能添加一项而且无论选择哪个都永远是第一项到paper表里?代码:setdbrs=DataEnv.rspaperdimi...
ListView1中明明我已经选择了好几项,为什么只能添加一项而且无论选择哪个都永远是第一项到paper表里?
代码:
set dbrs=DataEnv.rspaper
dim i as integer
For i = 1 To ListView1.ListItems.Count
If ListView1.ListItems(i).Selected Then
dbrs.AddNew
dbrs.Fields("PaperID") = dbrs.RecordCount + 1
dbrs.Fields("PaperName") = Trim(Text1.Text)
dbrs.Fields("QuestionID") = ListView1.ListItems(i)
dbrs.Fields("Score") = ListView1.ListItems(i).SubItems(2)
dbrs.Fields("QType") = "填空题"
End If
Next i 展开
代码:
set dbrs=DataEnv.rspaper
dim i as integer
For i = 1 To ListView1.ListItems.Count
If ListView1.ListItems(i).Selected Then
dbrs.AddNew
dbrs.Fields("PaperID") = dbrs.RecordCount + 1
dbrs.Fields("PaperName") = Trim(Text1.Text)
dbrs.Fields("QuestionID") = ListView1.ListItems(i)
dbrs.Fields("Score") = ListView1.ListItems(i).SubItems(2)
dbrs.Fields("QType") = "填空题"
End If
Next i 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询