Multiple entries using append query

browny

Registered User.
Local time
Tomorrow, 03:38
Joined
Mar 7, 2006
Messages
32
Hi all
Can someone help me with an Append query problem I am having. The end result I need is a Work sheet that has a Customers details, Plant details, Work required and a Subcontractor name. I have a search function that I use to select either a Customer name or Plant ID. Once I have selected the Customer name/Plant ID, I use a button to append the Customer Name and the Plant Id to a Plant_History table. This table uses an Autonumber field to create a unique identifier for each entry which I am using as the Work Sheet number. I have then added coding to open a form which accesses the Plant_History table directly so I can enter the work required and the contractor to carry out the work.
My problem is that the Customer and/or Plant will have multiple entries in the Plant_History table. Currently, when I select the button to append the details to the Plant_History table, if the Plant ID is already in the table, the number of records is doubled in the Plant_History table (eg if the record has previously been entered 4 times, 8 records will be appended to the table). I am not sure why this happens, if someone could point out the fault in my work, it would be much appreciated.
Regards
Craig
 
Hi all
Solved my own problem. I had entered the table I was appending to, to the append query. As a result, the query looked at both tables and entered the data for every record it found matching the criteria. Once I took the Plant_History table out of the query everything worked fine.
Regards
Craig
 

Users who are viewing this thread

Back
Top Bottom