Results 1 to 9 of 9
  1. #1
    willmafingerdo is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    108

    Appending current record to new table using a query

    Hello,
    I would like to make it so if the user clicks on a button it will run an append query and only append the data for the current record to the new table. I have it currently so it will add all records and it works, i am just not sure how to get it to limit to only the current record.


    Thanks,
    Will

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Add a criteria to your append query that limits it to the key field displayed on the form.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    willmafingerdo is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    108
    I understand what your saying pdaldy, but i don't know how to do it. could you provide some explanation or a link to the info?

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    In the criteria:

    Forms!FormName.TextboxName

    using the two appropriate names.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    willmafingerdo is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    108
    Quote Originally Posted by pbaldy View Post
    In the criteria:

    Forms!FormName.TextboxName

    using the two appropriate names.
    Sorry i had to work on a different project there for a while... I almost have this working... If i click on view query it will display the data i am trying to capture, but when i run it i get that the data cant be appended error. I even copied the original table and made it a new tableso all the data types ect all match. I have attached some screen shots if that would help.

    Click image for larger version. 

Name:	1.PNG 
Views:	10 
Size:	42.6 KB 
ID:	36867
    Click image for larger version. 

Name:	2.PNG 
Views:	10 
Size:	19.1 KB 
ID:	36868

  6. #6
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Are there required fields that your query isn't populating? Is the data being appended in the correct format, data type, etc? Is it violating a validation rule set in the table?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    willmafingerdo is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    108
    Ok, so i tried switching it to a "Make Table" query, ran it and it created the table and exported the data. Now i switched it back to an append query and it seems to be working now... any idea on what i was/am doing wrong?

  8. #8
    willmafingerdo is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    108
    Yes i copied the source table and renamed it with structure only so the new table should be a mirror of the source table right?

  9. #9
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Yes, it should be. Working okay now?
    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. Replies: 19
    Last Post: 05-16-2017, 07:34 AM
  2. Replies: 12
    Last Post: 12-25-2015, 03:25 PM
  3. Replies: 2
    Last Post: 12-05-2013, 12:09 PM
  4. Replies: 3
    Last Post: 09-18-2011, 03:46 PM
  5. Appending Data to Current Record on a Form
    By ganoudij in forum Access
    Replies: 2
    Last Post: 06-08-2011, 07:18 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