Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Posts
    24

    Unanswered: error 3464 received

    Hi guys
    I am recieving the following error: 3464 Error found data type mismatach in criteria expression
    Function Update_table()
    Dim db1 As Database
    Dim rs1 As Recordset
    Dim rs2 As Recordset
    Dim sDsloan As String

    On Error GoTo Err_Rtn

    Set db1 = DBEngine(0)(0)
    Set rs1 = db1.OpenRecordset("_Tbl_Fees_Cncls_06222009", dbOpenDynaset)
    Set rs2 = db1.OpenRecordset("TRN", dbOpenDynaset)

    Do While Not rs1.EOF

    'sDsloan = rs1!dsloan

    rs1.FindFirst "DSLOAN = " & rs2!Trloan
    If rs1.NoMatch Then
    MsgBox "No detail recs present "
    GoTo GoRnd
    End If
    rs1.Edit
    rs1!TRCODE = rs2!TRCODE
    rs1!TRDATE = rs2!TRDATE
    rs1.Update

    GoRnd:
    If Not rs1.EOF Then
    rs1.MoveNext
    End If

    Loop

    rs1.Close
    rs2.Close
    Exit Function

    Err_Rtn:
    MsgBox "Err found " & Err.Description & " " & Err.Number
    End Function

    Thank you,
    Trudye

  2. #2
    Join Date
    Mar 2009
    Posts
    24
    Sorry I forgot to include:

    The line of code that is causing the problem is
    rs1.FindFirst "DSLOAN = " & rs2!Trloan

    Both fields are 20 byte text fields

  3. #3
    Join Date
    May 2009
    Posts
    258
    Try this:
    Code:
    rs1.FindFirst "DSLOAN = '" & rs2!Trloan & "'"
    If they are text fields, the value needs to be quoted.

    Ax

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •