Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    gunterbrink is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2016
    Posts
    16

    Runtime error 3464

    I am having a problem with an input form where it takes data from the form and inserts into the table. I used the same code for the same database(different table names and forms etc) but i am having a problem when I either try to add a manifold or edit a manifold and update. This is where it is hanging. I cannot attach the db file as it is too large by 92kb. Any suggestions/ with explanation would be great as I am tring to learn Access. Thank you in advance.



    CurrentDb.Execute "UPDATE mf_list " & _
    " SET MFID=" & Me.txtMFID & _
    ", MFType='" & Me.cboMFType & "'" & _
    ", MFName='" & Me.txtMFName & "'" & _
    ", MFRecertDate='" & Me.txtMFRecertDate & "'" & _
    ", MFLocation='" & Me.txtMFLocation & "'" & _
    " WHERE MFID=" & Me.txtMFID.Tag
    Attached Files Attached Files
    Last edited by gunterbrink; 12-29-2016 at 07:16 PM. Reason: attach file

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    What's the text of the error? You're treating all the update fields as text; is that correct? One looks like a date, which would require # as a delimiter instead of '.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    gunterbrink is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2016
    Posts
    16
    data type mismatch in criteria expresion

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,420
    what is error 3464? this usually explains where the problem is. At the moment there are a couple of possibles - RecertDate looks like it should be a date field, but you are treating as text. The other is you appear to be trying to update an ID field which is not allowed if it is an autonumber and if not perhaps breaks data integrity rules.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Change the delimiter for the date field.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    gunterbrink is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2016
    Posts
    16
    runtime error 3464
    data type mismatch in criteria expression. the MFID field is not an auto numbered field. How would I handel the # in the code:

    ", MFRecertDate= # & Me.txtMFRecertDate & #" & _

    ?

  7. #7
    gunterbrink is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2016
    Posts
    16
    I tried the above and it didn't work as well as a couple of other variations. I tried changing the field from date/time to short text, but it is still giving the same error code

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I said # instead of ', so:

    ", MFRecertDate=#" & Me.txtMFRecertDate & "#" & _
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    gunterbrink is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2016
    Posts
    16
    ok, so i tried that and it is still kicking me the same error, I hate to keep bothering you guys I'm sure this is EXTREMELY elementary. Is there a different way to attach the db as it is 762kb. or email to someone for a look.

  10. #10
    gunterbrink is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2016
    Posts
    16
    I was able to attach the db, please see first post for attachment.

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You should be able to attach after zipping it.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #12
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Your MFID field is text, so needs ' delimiters both in the SET and WHERE clauses.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  13. #13
    gunterbrink is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2016
    Posts
    16
    Trying to learn, Like this?

    CurrentDb.Execute "UPDATE mf_list " & _
    " SET MFID='" & Me.txtMFID &"' _
    ", MFType='" & Me.cboMFType & "'" & _
    ", MFName='" & Me.txtMFName & "'" & _
    ", MFRecertDate=#" & Me.txtMFRecertDate & "#" & _
    ", MFLocation='" & Me.txtMFLocation & "'" & _
    '" WHERE MFID="' & Me.txtMFID.Tag

  14. #14
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    More like:

    CurrentDb.Execute "UPDATE mf_list " & _
    " SET MFID='" & Me.txtMFID & _
    "', MFType='" & Me.cboMFType & "'" & _
    ", MFName='" & Me.txtMFName & "'" & _
    ", MFRecertDate=#" & Me.txtMFRecertDate & "#" & _
    ", MFLocation='" & Me.txtMFLocation & "'" & _
    " WHERE MFID='" & Me.txtMFID.Tag & "'"

    You'll find it helpful to use a variable for the SQL and this technique to see how it's coming out:

    BaldyWeb-Immediate window
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  15. #15
    gunterbrink is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2016
    Posts
    16
    That fixed it! You are awesome! Thank you, Good explanation too.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 08-24-2015, 09:14 PM
  2. Syntax Error 3464 Need help
    By draalderks in forum Forms
    Replies: 13
    Last Post: 06-09-2015, 10:11 AM
  3. Run Time error 3464
    By cc.caroline15 in forum Programming
    Replies: 5
    Last Post: 03-17-2015, 02:36 PM
  4. Execution error 3464
    By Trisha in forum Access
    Replies: 3
    Last Post: 03-03-2014, 01:03 PM
  5. 3464 error received
    By TEN in forum Programming
    Replies: 10
    Last Post: 07-08-2009, 07:25 PM

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