W
Wavequation
I am trying to run the following code:
Dim intCompNum
Dim db as DAO.Database
Dim rsStock As DAO.Recordset
Set db = CurrentDb
Set rsStock = db.OpenRecordset("Tbl_Location")
intCompNum = 546
strCriteria = "[Component] = " & intCompNum ("Component" is a field in
Tbl_Location)
rsStock.MoveFirst
rsStock.FindFirst(strCriteria)
at the last line, VBA returns Run-time error '3251':
Operation is not supported for this type of object.
What am I doing wrong?
Dim intCompNum
Dim db as DAO.Database
Dim rsStock As DAO.Recordset
Set db = CurrentDb
Set rsStock = db.OpenRecordset("Tbl_Location")
intCompNum = 546
strCriteria = "[Component] = " & intCompNum ("Component" is a field in
Tbl_Location)
rsStock.MoveFirst
rsStock.FindFirst(strCriteria)
at the last line, VBA returns Run-time error '3251':
Operation is not supported for this type of object.
What am I doing wrong?