Results 1 to 2 of 2
  1. #1
    Perfac's Avatar
    Perfac is offline Expert
    Windows 10 Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618

    Append query creates an extra record.

    I have an append query named y1CompareTablesAdd. When I append it manually it works fine. There must be a problem with the VBA in the module. When the module activate the VBA it creates an extra record. What is strange is the table it appends to has an autonumber ID field, and also the append query does not display the extra record before appending. On the image it can be seen, I think it is got something to do with the line starting with InsertInto.
    Click image for larger version. 

Name:	Compare6.png 
Views:	12 
Size:	16.3 KB 
ID:	41400Click image for larger version. 

Name:	Compare7.png 
Views:	12 
Size:	29.2 KB 
ID:	41401

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    when providing code snippets, please copy/paste the code and use the code tags to preserve formatting. By using screenshots of code you make it difficult for responders to help you because they have to retype everything.

    As it is you are deleting from one table, inserting to another, then inserting to the table you just deleted from. So I don't see an extra record in the other table - only the one you inserted

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

Similar Threads

  1. Replies: 3
    Last Post: 10-04-2015, 10:17 AM
  2. Append Query Creates a New Record
    By burrina in forum Queries
    Replies: 5
    Last Post: 01-01-2013, 07:27 PM
  3. Replies: 5
    Last Post: 08-21-2012, 12:30 PM
  4. Replies: 5
    Last Post: 06-29-2010, 01:24 PM
  5. subform creates duplicate record
    By jheintz57 in forum Forms
    Replies: 0
    Last Post: 03-29-2010, 11:50 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