I guessing from the code you supplied that you are using ADO. If so, there is no findfirst method... instead use

Data1.Recordset.MoveFirst
Data1.Recordset.Find StrName

Your StrName creation looks ok to me.