Hi, I am helping a friend reconfigure his database, and we would like to setup a way to delete records from the database once they are no longer needed. The database is currently setup with 3 tables (at least for this part).
Table 1 Items Sold
Contains fields
Autonumber (primary key)
Consignor number (linked with relationships to Consignor Information table and Volunteer table)
Item#
Description
PriceSold
DateSold
Volunteer?
Table 2 Consignor Information
Contains fields
Consignor # (primary key) (linked with relationships to Items Sold and Volunteer table)
Consignor First name
Consignor Last name
Table 3 Volunteer
Contains fields
Autonumber (primary key)
Consignor # (linked to Items sold and Consignor Information)
The 2 Relationships joining these tables are:
Relationship 1
Type: Indeterminate
From Volunteer Table To ItemsSold
Using the Consignor Number for the link
Relationship 2
Type: 1-to-Many
From Consignor Information table To ItemsSold table
Using Consigner Number for the link
I was trying to set it for Cascade delete (so that in a form only showing Consignor Information (from the Consignor Information table) you could delete ALL information related to that consigor. However when I try this I get 2 different errors, depending on the tables related:
Error 1 When trying to set Enforce Referential Integrity (cascade delete) for Relationship 1:
No unique index found for the referenced field of the primary table.
Error 2 When trying the same thing for Relationship 2:
Data in the table "ItemsSold" violates referential integrity Rules. For example, there maybe records to an employee in the related table, but no record for the employee in the primary table. Edit the database so that records in the primary table exist for all related records.
Can anyone help with this? Is there an easier way to do it? such as maybe a form where you can select the record and delete it?
Anyhelp would be great!!!
Related to this is another question dealing with the Volunteer Table.
for bookkeeping he has a form that steps you thru the process, on step 3 he has steps 3a, 3b, 3c.
3A: Open form (Volunteer Data Entry form) you enter in the consignors who are volunteering
3B: you have to open up a Query (Check Volunteer Marked Y) and change all of the Ns to Ys, which gets to be a VERY long process. Is there anyway to make them all Ys to begin with, without setting ALL people to Y, or to set it so that when you change the 1st N to a Y, it changes all of the Ns into Ys?
3C: just printing out the report.
Thanks again for any help you can give me on this
Table 1 Items Sold
Contains fields
Autonumber (primary key)
Consignor number (linked with relationships to Consignor Information table and Volunteer table)
Item#
Description
PriceSold
DateSold
Volunteer?
Table 2 Consignor Information
Contains fields
Consignor # (primary key) (linked with relationships to Items Sold and Volunteer table)
Consignor First name
Consignor Last name
Table 3 Volunteer
Contains fields
Autonumber (primary key)
Consignor # (linked to Items sold and Consignor Information)
The 2 Relationships joining these tables are:
Relationship 1
Type: Indeterminate
From Volunteer Table To ItemsSold
Using the Consignor Number for the link
Relationship 2
Type: 1-to-Many
From Consignor Information table To ItemsSold table
Using Consigner Number for the link
I was trying to set it for Cascade delete (so that in a form only showing Consignor Information (from the Consignor Information table) you could delete ALL information related to that consigor. However when I try this I get 2 different errors, depending on the tables related:
Error 1 When trying to set Enforce Referential Integrity (cascade delete) for Relationship 1:
No unique index found for the referenced field of the primary table.
Error 2 When trying the same thing for Relationship 2:
Data in the table "ItemsSold" violates referential integrity Rules. For example, there maybe records to an employee in the related table, but no record for the employee in the primary table. Edit the database so that records in the primary table exist for all related records.
Can anyone help with this? Is there an easier way to do it? such as maybe a form where you can select the record and delete it?
Anyhelp would be great!!!
Related to this is another question dealing with the Volunteer Table.
for bookkeeping he has a form that steps you thru the process, on step 3 he has steps 3a, 3b, 3c.
3A: Open form (Volunteer Data Entry form) you enter in the consignors who are volunteering
3B: you have to open up a Query (Check Volunteer Marked Y) and change all of the Ns to Ys, which gets to be a VERY long process. Is there anyway to make them all Ys to begin with, without setting ALL people to Y, or to set it so that when you change the 1st N to a Y, it changes all of the Ns into Ys?
3C: just printing out the report.
Thanks again for any help you can give me on this