Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Records from RS Not Working

Status
Not open for further replies.

Fattire

Technical User
Nov 30, 2006
127
US
I don't see what I'm doing wrong with this update, no error occurs, but no update either. Both rec2 and rec5 are ADO. rec2 comes from Oracle, rec5 from Access.

Code:
    Do While Not rec2.EOF
        With rec5
            .MoveFirst
            .Find "[po] = " & rec2!PO_NUMBER, , adSearchForward
            !GL_CODE = rec2!expense_account
            .Update
        End With
        rec2.MoveNext
    Loop

po is text in Access, rec2!PO_NUMBER is varchar in Oracle

I've tried:
.Find "[po] = '" & rec2!PO_NUMBER & "'"
.Find "[po] = """ & rec2!PO_NUMBER & """
.Find "[po] = " & rec2!PO_NUMBER &
 
Both rec2 and rec5 are ADO
Code:
    Do While Not rec2.EOF
        With rec5
            .MoveFirst
            .Find "po='" & Trim(rec2!PO_NUMBER) & "'"
            !GL_CODE = rec2!expense_account
            .Update
        End With
        rec2.MoveNext
    Loop

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top