我有一个名为QB的表,其中包含一个字段名称Item。我尝试使用
首先使用findDim 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