burritonator
IS-IT--Management
I have two tables called "Devices" and "DeviceTypes". Records in the Devices table have a field that contains the Primary Key of one of the records in the DeviceTypes table. I want to make sure that records don't get deleted from DeviceTypes if there are any records in Devices that are still associated with them.
I set up a Relationship between the two tables and turned on Referential Integrity, but it actually imposes more restrictions than I actually want. The Relationship does prevent the deletion of records from DeviceTypes if there are related records in Devices, which is what I want. However, when the user adds a new record to Devices, it forces them to set a value for the field that points to the DeviceTypes table, which I *don't* want. I want for the user to be able to leave that field blank if desired, as it isn't a required field (although the Relationship has turned it into one).
So, is there a way that I can prevent deletions from DeviceTypes when a related record exists in Devices, without requiring a device type to be set for every record that is added to the Devices table?
Thanks,
Burrito
I set up a Relationship between the two tables and turned on Referential Integrity, but it actually imposes more restrictions than I actually want. The Relationship does prevent the deletion of records from DeviceTypes if there are related records in Devices, which is what I want. However, when the user adds a new record to Devices, it forces them to set a value for the field that points to the DeviceTypes table, which I *don't* want. I want for the user to be able to leave that field blank if desired, as it isn't a required field (although the Relationship has turned it into one).
So, is there a way that I can prevent deletions from DeviceTypes when a related record exists in Devices, without requiring a device type to be set for every record that is added to the Devices table?
Thanks,
Burrito