Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Querie and table referential intergrity violations. "Need a Challenge"

Status
Not open for further replies.

Bickertk

Programmer
Aug 26, 2002
23
0
0
GB
Hi

I have had some help on this but am getting nowhere!

I have two tables one Information about HGV vehicles the other about accidents that vehicle has had.

I have made two more table, i.e. HGV_History and HGV_Accident_History.

I have made two append queries to move data about any vehicles that have been sold to the history tables. Current vehicles "yes" or "No" is used for this.

When I run the queries as stand alone they move the data. As soon as I build the relationship for referential integrity, cascade, delete I get violations and it will not move the data to one table and delete if from another.

I have checked the tables and eveything is in sync.

Can anyone help I am getting desparate?

I include everything in the tables for these vehicles so in the accident table there could be more than one record for each vehicle.

Is there anything I should leave out or add in to make the move.

I want to keep the same index numbers so do not set the history table to autonumber?

I have set a relationship for the history tables to Referential integrity?

Do I need this or not , or is there more I need?

Help again.

If anyone is willing to look at a short version of what I am trying to do let me know or if you can post details of where you think I am going wrong it will be appreciated.

Regards
 
I think you may have the relationships set up wrong. It sounds like you have the vehicals table linked up to the history table. If you have referencial integrity set between them, then the history table cannot have a record unless there is a matching record in the vehical table. Well if you are trying to move it over it won't work. If you want to email to me I will look at it and give you some thoughts. Dawn dawn@calliopeconsulting.net
 
I'll have a look at it too if you like-could use a challenge tonight.

Dan

pdldavis@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top