Results 1 to 2 of 2
  1. #1
    Eranka is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2017
    Posts
    150

    Delete Error

    HI

    Code:
    CurrentDb.Execute "DELETE * FROM tblUser WHERE [ID] = '" & Me.Combo4 & "';"
    when i run the above code i get "data type mismatch error"

    tblUser ID datatype number
    Combo4 = number.


    how to ignore the above error? any changes to be done for the above code?

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,936
    if they are numbers, you don't need to text qualifiers.

    …..[ID] = " & Me.Combo4

    FYI, you don't need the semi colon either

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Syntax Error when running delete SQL
    By TheKillerMonkey in forum Programming
    Replies: 3
    Last Post: 05-04-2016, 11:44 AM
  2. Error on Delete Query
    By DMJ in forum Queries
    Replies: 1
    Last Post: 01-02-2015, 05:50 PM
  3. ignore delete error
    By smahdih in forum Access
    Replies: 1
    Last Post: 11-05-2011, 03:42 PM
  4. Error: Could not delete from specified tables
    By kaledev in forum Queries
    Replies: 1
    Last Post: 03-03-2011, 02:07 PM
  5. Error while trying to add delete link button.
    By islandboy in forum Access
    Replies: 3
    Last Post: 09-03-2009, 09:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums