One possibility is that you have a corrupted database. Are there any other signs of that?
The duplicate autonumbers you mention--are they keys in the Completion and Out To tables? That would be explained if you compacted the database after you cleared these tables. When you compact, Access automatically locates the highest number in use and sets the next Autonumber to one higher. If there are no rows, it sets the next Autonumber to 1.
The fact that Access wouldn't let you define the relationships until you cleared the child tables suggests that, by that time, you already had out-of-sync keys, which would suggest that the loss of the relationships occurred at some previous time.
The most likely way the relationships were lost would be if the Completion table was dropped and recreated. Could it be that you made a duplicate table at some point, copied the records to it, renamed and deleted the original table, and renamed the new one to Completion? Perhaps you don't realize that relationships are associated with the actual table, not merely with the name. When you deleted the original table, the relationships were dropped with it. If the table has an Autonumber key, that could also explain how the Autonumbers got hosed, depending on how you copied the records to the new table. If you used an Append query to do the copying, the Autonumbers would be retained, but if you used any other method new Autonumbers would have been assigned.
If you use a MakeTable query on an existing table, the table is deleted and recreated--but the relationships, which are deleted with it, are not recreated.
In general, it's not easy to drop a table without having Access warn you that the relationships will go with it, but if SetWarnings False is in effect, you might not get the warning. SetWarnings False is often used when code is used to manipulate table design, and sometimes when manipulating records behind the scenes (especially when doing bulk updates or deletes). If the code doesn't do SetWarnings True before it exits--say, because an error aborted the routine, or the error was trapped but the code didn't clean up before exiting--it won't be obvious that the warnings are turned off. That creates the possibility that a MakeTable query could delete the relationships without your getting a warning about it. Check whether you have any SetWarnings in code, and if so, make sure they're balanced False and True regardless of any errors that might occur.
If you post again, explain how the tables are related (parent keys and foreign keys of each), and whether you are enforcing relational integrity in the relationships.
Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein