Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Access 2003 - ADO syntax changes issues with editing a recordset?

Avatar of sabrina_spillane
sabrina_spillane asked on
Microsoft Access
14 Comments1 Solution304 ViewsLast Modified:
Hi All,

I have a recorderset that I changed to ADODB and I am getting the following error:

Compile Error: "Method or data member not found"

I get this error in the following source code:

Private Sub txtModel_AfterUpdate()
    If IsNull(Me.txtModel) Or Me.txtModel = "" Then
        Exit Sub
    End If
   
    Dim query As String
    Dim rs As New ADODB.RecordSet ---this is the change i made
    Dim val As String
    Dim pos
   
    query = "SELECT crpProductModel_Model" _
            & " FROM crpProductModels" _
            & " WHERE crpProductModel_crpProductID=" & Me.AppProductId & ";"
 
    Set rs = CurrentDb.OpenRecordset(query)
    While Not rs.EOF
        val = rs("crpProductModel_Model")
        pos = InStr(1, val, " (", vbTextCompare)
        If Not IsNull(pos) And pos > 0 Then
            rs.Edit                         -----THIS IS WHERE THE ERROR IS OCCURING?????
            val = Me.txtModel & Mid(val, pos)
            rs("crpProductModel_Model") = val
            rs.Update
        End If
        rs.MoveNext
    Wend
    rs.Close
    Set rs = Nothing
End Sub

It doesn't seem to recognize rs.Edit anymore. How can I over come this issue.

Thanks again for all the help
ASKER CERTIFIED SOLUTION
Avatar of rockiroads
Commented:
This problem has been solved!
Unlock 1 Answer and 14 Comments.
See Answers