Append Query w/ Duplicate

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table called Activities. This table is filled in by the user to
identify activities of a busienss. Its only two fields are Cycle and
Activity, both of which are set as primary keys. I did this so I could have
duplicates of cycle or of activity, but not a duplicate of the same
combination. This seems to work. Next, after the user has defined the
activities, they must grade each one on a risk assessment form which stores
the data in a risk assessment table. This table has the cycle and the
activity, but also has about 8 other grade fields. I created an append query
to update the risk assessment table with the results of the activity table
and that works, but I am having trouble when the user makes a change to the
activities table with a deletion or a new addition. My append query adds all
records again and I end up with duplicates in the risk assessment table. Can
someone tell me how to keep from getting duplicates or how to delete
duplicates? Also, any thoughts on how I have the two tables set up as well,
should I only use one table for this?
 
I think I'd need to see your queries to REALLY see what's going on, BUT some
pointers..

On your activities table, ad an ID field.. make that the ONLY primary key.
To insure your Cycle/activity combination remains unique add an index (**
May have to read help to do this)... You can have many indexes on a table..
the are pretty much like extra keys if you need to specify more conditions.

Use the ID from activities to link to other tables using a cycle/activity
combination.

Once you see how the indexes work it may give you ideas for your other
tables getting duped up.. I can't really fix the problem without seeing the
queries and why they are re-appending some information.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top