microsoft access 2010 vba dao记录集findfirst
我有一个名为QB的表,它有一个字段名Item。我正试着用find first和microsoft access 2010 vba dao记录集findfirst,vba,ms-access-2010,dao,recordset,Vba,Ms Access 2010,Dao,Recordset,我有一个名为QB的表,它有一个字段名Item。我正试着用find first和 Dim curDatabase As DAO.Database Set curDatabase = CurrentDb Set rsQB = curDatabase.OpenRecordset("QB", dbOpenDynaset) 'This works and equals the value for Item in the first record of the table msgbox
Dim curDatabase As DAO.Database
Set curDatabase = CurrentDb
Set rsQB = curDatabase.OpenRecordset("QB", dbOpenDynaset)
'This works and equals the value for Item in the first record of the table
msgbox (rsQB("Item").Value)
'Item_No.Value is a string. The following all do not work:
rsQB.FindFirst "[Item] = " & Item_No.Value
rsQB.FindFirst ("[Item] = " & Item_No.Value)
rsQB.FindFirst "[Item] = '" & Item_No.Value &"'"
rsQB.Close
这个给你什么错误信息
rsQB.FindFirst“[Item]=”&Item_No.Value&“”
这一条会给你什么错误消息<代码>rsQB.FindFirst“[项目]=”&项目编号值&“”