Reset Tables

ViRi

Registered User.
Local time
Today, 05:21
Joined
Jan 31, 2006
Messages
44
How can I reset my Tables without affecting the Relationships

ViRi
 
By reset I mean removing all existing records to start the Table again with the same structure but with no records at all.

ViRi
 
Use a delete query to delete all the records in the table.
 
I tried using a delete Query and I get an Access can't delete due to key violations error.

ViRi
 
You are trying to delete from the wrong table can you post a picture of your relationships?
 
I'm new I don't know how to do this.

ViRi
 
It would probably be easier to post you db. Just zip a copy and then press post reply then click manage attachments and upload the .zip file.
 
You will have change the the relationship on tblCustomer to Cascade delete Related records. Then run your delete query on tblCustomer. You can change the relationship back once you delete the records if you would like.
 
I don't have a tblCustomer did you mean tblClient? If you do I changed the relationship and I still get the same error.


ViRi
 
In general, your error relates to having a dependency. If you want to erase everything, you can do this one of two ways.

1. Remember your relationships by writing them on paper. Remove them. Do the delete on all participating tables. Manually re-establish your relationships.

2. Draw a dependency diagram. Where you have 1/1 or 1/many relations, the one on the LEFT of the relationship diagram is generally the "parent" and the one on the RIGHT is usually the "child." Delete the contents of all child tables first. Then you can delete the contents of the parent tables. If you have multi-layer dependencies (grandchild tables?) then they go before the child or parent tables. In other words, think of the main table as the main trunk of the tree. Trim the tree from the branches towards the trunk.
 

Users who are viewing this thread

Back
Top Bottom