I keep getting run time error 3251(Operation
is not supported for this type of object) with
.FindFirst, .FindLast, ...
example:
With rstCustomer
.FindFirst strID
End With
Printable View
I keep getting run time error 3251(Operation
is not supported for this type of object) with
.FindFirst, .FindLast, ...
example:
With rstCustomer
.FindFirst strID
End With
FindLast uses the same stuff...Code:Dim strSql1 As String
strSql1 = "SELECT *, LName & ', ' & FName as FullName FROM Phone order by lname;"
datName.RecordSource = strSql1
datName.Refresh
'strFindme = whatever you look for
strFindMe = DBCombo1.Text
strFindMeName = the fieldname to seache in and what to find
strFindMeName = "fullname = '" & strFindMe & "'"
'
datName.Recordset.FindFirst strFindMeName
datName.Recordset.FindLast strFindMeName
The type of error you describe is usually due to opening the recordset as a "table" rather than as a "dynaset" or "snapshot". The "Find" methods only work with the latter two. For table-type recordsets, you need to use "Seek".