473,405 Members | 2,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Why does Access duplicate records when appending to another table

The issue that I have is that Access 10 duplicates records when I try to append them from one table to another. the tables have identical naming conventions, and attributes.

This is the code that Access provides:
Expand|Select|Wrap|Line Numbers
  1. INSERT INTO TblWODDate
  2. SELECT TblTempInput1.*
  3. FROM TblTempInput1 LEFT JOIN TblWODDate ON (TblTempInput1.Date = TblWODDate.Date) AND (TblTempInput1.Movements = TblWODDate.Movements);
Thanks for your help
bob
Oct 10 '17 #1

✓ answered by PhilOfWalton

Basically Bob, You have told Access to add the records and for once in a while Access does as it is told.

If you want to prevent duplicates, you must set up the table's indexes correctly. I presume you want to prevent the duplication of Date & Movement, so try creating a new Index Called DateMovement based on Date & Movement and make it Unique.

NB "Date" is a reserved word and should NEVER be used as a field name. Change it to MovementDate or something similar. Another NoNo is "Name" and there are lots more.

Phil

1 1242
PhilOfWalton
1,430 Expert 1GB
Basically Bob, You have told Access to add the records and for once in a while Access does as it is told.

If you want to prevent duplicates, you must set up the table's indexes correctly. I presume you want to prevent the duplication of Date & Movement, so try creating a new Index Called DateMovement based on Date & Movement and make it Unique.

NB "Date" is a reserved word and should NEVER be used as a field name. Change it to MovementDate or something similar. Another NoNo is "Name" and there are lots more.

Phil
Oct 10 '17 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jennifer | last post by:
I have a query with 5 possible criteria via a form. If criteria is not entered, I use the like Nz() function on the backend query to use an "*" for criteria fields left blank. The query is not...
2
by: jmarr02s | last post by:
I don't know what I am doing wrong I get duplicate records when I query Here is my SQL query code: SELECT Utilization_T.Facid, Utilization_T.Year, Utilization_T.Beds, Utilization_T.LicBeds,...
1
by: shalini0702 | last post by:
Hi, I have Missing Records when exporing a table from (msaccess) One database to another. Supppose My Db has 10 tables and expoting all the table from One database to another was correct. ...
0
by: ARC | last post by:
Hello all, I have a few custom reports I've created for end-users, and it appears that, when I distribute the runtime .accde, access is resetting the margins. Does anyone know for sure if access...
6
by: Dilip1983 | last post by:
Hi All, I want to delete duplicate records from a large table. There is one index(INDEX_U1) on 4 columns(col1,col2,col3,col4) which is in unusable state. First of all when i tried to rebuild...
5
by: CoreyReynolds | last post by:
Hello, I am currently about to give up after scouring the internet for how to do this, it's probably a relatively novice answer, but I am a relatively novice user. I have three tables...
1
by: Nick H | last post by:
I am having problems accessing full records, (displaying parent and child information) if the child record is empty. I have managed to fix this when showing records in datasheets using queries,...
4
by: mhegazy | last post by:
Dear guys, Is there a reason for MS access to be not responding to open table order. Upon trying to open a table in the datasheet view it doesnot while it do in the design view. Would you...
0
by: madhavateja | last post by:
i want remove duplicate records from the base table with out using rowid concept.i have one solution this is.. first selecting unique records from the table. now creating a new table with this...
8
by: Petrol | last post by:
I have two related tables: , which gives details such as date, location etc of a particular event; and , which records the people who attended that event. Fields include WalkNumber and PersonID. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.