If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
append Query duplicating records
I have an Append Query which runs from an On click event
attached to a command button in a form. When the append query fires it adds records to a table which is then queried and shows up in a subform. Some of the Append Query fields are pulled from the main form (based on table Tests) and are used to make new records in one of the tables used in the subform (based on tables Questions and Answers). test_id:forms!frmtest!test_id APPENDED TO test_id in "Answers" table. question id (from Questions table) APPENDED TO question_id in "Answers" table. registration_id: forms!frmtest!registration_id APPENDED TO registration_id in "Answers" table. test_master_id (from Questions table) criteria set at "2". The problem I am having is that once there are 2 or more records in the main form, the Append Query will create double/triple/quadruple the records in the subform. e.g. first record in main form - append query creates the required 8 records in the subform; second record in the main form - append query creates the required 8 records in the subform; third record in the main form - append query creates 16 records in the subform (the required 8 plus a duplication of those 8); fourth record in the main form - append query creates 24 records in the subform (the required 8 times 3 (so 3 duplications)). Does anyone have any idea at all why it is doing this?? Please help, Alex. |
#2
|
|||
|
|||
append Query duplicating records
Alex
It isn't clear, from your explanation, why you are duplicating data "pulled from the main form ... and used to may new records...". This is generally not a good idea in a relational database. Perhaps a description of your data would lead to suggestions for normalization (which would let you use more of Access' strengths). If your append query returns all the rows from your main table, it will produce (i.e., append) one for each row in your main table. Posting your SQL statement would give readers something to work from. -- More info, please ... Jeff Boyce Access MVP |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
append query overwrites all matching records | NoSpamTakeSquareRootOfNumber | Running & Setting Up Queries | 4 | July 8th, 2004 02:43 PM |
can't append records in append query | Greg Clements | Running & Setting Up Queries | 1 | July 2nd, 2004 04:29 PM |
Modifying table design breaks Append query | MKH | Database Design | 2 | June 15th, 2004 04:05 PM |
Append query | Dennis | Running & Setting Up Queries | 5 | June 10th, 2004 02:21 AM |
Append query from Form | CS | Using Forms | 1 | June 8th, 2004 08:46 AM |