Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2002
    Posts
    13

    Unanswered: 80040E07 - Data Type Mismatch in Criteria Expression??

    hello folks...

    i keep getting this error:
    80040E07 - Data Type Mismatch in Criteria Expression

    when trying to execute the following code:

    For i = 0 To (intLength - 1)
    thePosition = CInt(arrItems(i))
    strSQL = "SELECT ItemPosition FROM tblOrder WHERE ItemPosition = " & thePosition
    With rsItems
    **.Open strSQL, conPubs, adOpenDynamic, adLockOptimistic
    .Fields("ItemPosition") = CInt(i)
    .Update
    End With
    Next

    i'm using an access db where ItemPosition is of type "number" (specifically Integer). arrItems is a single dimensional array of strings...and the for loop is working correctly. it gives me the error on the ** line.
    any ideas??

    thanks!
    b

  2. #2
    Join Date
    Sep 2002
    Posts
    13
    alas...i'm dumb.

    i somehow changed the number field in the db to text...thus leading exactly to the behaviour shown. ignorance.

    all is now well,
    b

Posting Permissions

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