+ Reply to Thread
Results 1 to 2 of 2

error 3464 data type mismatch in criteria expression in CurrentDb.Execute update

  1. #1
    Registered User
    Join Date
    04-14-2015
    Location
    London
    MS-Off Ver
    2007
    Posts
    36

    error 3464 data type mismatch in criteria expression in CurrentDb.Execute update

    Hi experts.. I'm getting the above error when trying to update may database table with the code below.

    Is my understanding correct that the code below is instructing access to update the stated database ""Update R_P_Data_P" by setting the listed fields to the values of the me.XXX values listed but only for the record where the field rID is = me.txtrID??

    Background - I ask because it's the addition of this field and criteria that Has started giving me this error. The rID field in the table is an autonumber field. The me.txtrID field is a number format unbound field on the subform.

    CurrentDb.Execute "Update R_P_Data_P " & _
    "Set refNo='" & Me.txtrefNo & "'" & _
    ", ProfileCriteria='" & Me.cmbpc & "'" & _
    ", subProfileCriteria='" & Me.cmbsubpc & "'" & _
    ", appNo='" & Me.txtappno & "'" & _
    ", DetailsSummary='" & Me.txtdetsum & "'" & _
    ", actionDetails='" & Me.txtactiondet & "'" & _
    ", outcome='" & Me.cmbOut & "'" & _
    ", deadlineDate=#" & Me.txtDeaddate & "#" & _
    ", createdBy='" & Me.cmbcreatedby & "'" & _
    ", dateCreated=#" & Me.txtDatecreated & "#" & _
    ", qtr='" & Me.txtQtr & "'" & _
    ", activity='" & Me.cmbActi & "'" & _
    ", dateAssessed=#" & Me.txtDateAss & "#" & _
    ", assignee='" & Me.txtassignee & "'" & _
    ", responseDetails='" & Me.txtrespdet & "'" & _
    ", responseDate=#" & Me.txtRespdate & "#" & _
    ", status='" & Me.cmbstatus & "'" & _
    ", score='" & Me.txtscore & "'" & _
    ", colour='" & Me.txtColour & "'" & _
    " WHERE rID='" & Me.txtrID & "';"

    I'm slowly loosing the will to code because I'm absolutely frustrated now as I just can't understand why is not working. Please Please help

  2. #2
    Valued Forum Contributor Kamboj's Avatar
    Join Date
    09-25-2014
    Location
    India
    MS-Off Ver
    2003 - 2010
    Posts
    430

    Re: error 3464 data type mismatch in criteria expression in CurrentDb.Execute update

    Check your field datatype, there will be datatype given as number which you are updating with text data type. convert text to number with cdbl(text)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. CurrentDb.Execute From Where with Variables
    By remus79 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-22-2015, 01:58 PM
  2. Not able to execute a function - ByRef argument type mismatch
    By dax2ib in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-22-2013, 01:56 AM
  3. [SOLVED] Data Type Mismatch in Criteria Expression
    By williams485 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-15-2012, 10:26 AM
  4. Type Mismatch Error on Large Data Sets
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-04-2010, 04:40 PM
  5. [SOLVED] Type Mismatch Error when getting data from another workbook
    By Tony Zappal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-12-2005, 07:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1