Results 1 to 2 of 2
  1. #1
    MCCDOM is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Nov 2014
    Posts
    28

    Run-time Error '424': Object required

    Hi all,



    I am getting this message pop up (Run-time Error '424': Object required) when I try and add the contents of the form to the table. Could somebody help please.

    Many Thanks

    Code:
    Private Sub btnAdd_Click()
    
    
        Dim iCtr As Integer
        For iCtr = 1 To Me.txtQty
            strCurrentDB.Execute "INSERT INTO tblTest (Item & Date Purchased) VALUES ('" & Me.txtItem & Me.txtDate & "')"
        Next
    End Sub

  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,652
    The syntax of the query is incorrect. Fields are separated by commas and fields with inadvisable spaces need to be bracketed. Date and text fields require delimiters. This may help:

    http://www.baldyweb.com/BuildSQL.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Runtime Error 424 Object Required
    By Maltheo2005 in forum Programming
    Replies: 9
    Last Post: 06-13-2013, 04:52 PM
  2. Object Required Error
    By sgp667 in forum Programming
    Replies: 1
    Last Post: 11-06-2012, 03:15 AM
  3. Error: Object Required
    By compooper in forum Programming
    Replies: 6
    Last Post: 06-22-2011, 07:52 AM
  4. Object Required Error.
    By Robeen in forum Forms
    Replies: 1
    Last Post: 03-28-2011, 10:30 AM
  5. Run-time error '424': Object required
    By cowboy in forum Programming
    Replies: 18
    Last Post: 07-07-2010, 03:32 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