PeterBaileyUk
asked on
access .findfirst method syntax
I have a .findfirst method in my function but it squeels error 3251 op is not supported
not sure how to correct.
not sure how to correct.
Public Function ApplyAlias(Strin As String) As String
Dim Db As DAO.Database
Set Db = CurrentDb()
Dim rstTclient As DAO.Recordset
Dim StrOutput As String
Dim Index As Integer
Dim WordArray() As String
WordArray() = Split(Trim(Strin), " ")
Set rstTclient = Db.OpenRecordset("TblModelAlias")
For Index = LBound(WordArray) To UBound(WordArray)
With rstTclient
.MoveFirst
.FindFirst "[sDesc] = '" & WordArray(Index) & "'"
If .NoMatch Then
'do nothing
Else
WordArray(Index) = .Fields("sClientDescGroup").Value
End If
End With
Next
Index = 0
For Index = LBound(WordArray) To UBound(WordArray)
If Index = 0 Then
StrOutput = WordArray(Index)
Else
StrOutput = StrOutput & " " & WordArray(Index)
End If
Next
ApplyAlias = StrOutput
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you all working
https://www.experts-exchange.com/questions/26648061/Access-runtime-error-3251-operation-not-supported.html
https://www.experts-exchange.com/questions/28108473/Microsoft-Access-Operation-is-not-supported-for-this-type-of-object-Error-3251.html