check table for records before deleting record from second table
i hate trying to think of titles that make sence
Anyway i have two tables tblCustomer and tblRental using a one to many relationship - no referential integrity.
i want to delete a record from tblCustomer (which i can do fine) but my problem is i want to first check there are no records in tblRental with the same Customer ID as the tblCustomer record i wish to delete and that a 2nd field in tblRental isnt equal to "Open"
i have no idea how to go about this, any help would be greatly appreciated.
i hate trying to think of titles that make sence

Anyway i have two tables tblCustomer and tblRental using a one to many relationship - no referential integrity.
i want to delete a record from tblCustomer (which i can do fine) but my problem is i want to first check there are no records in tblRental with the same Customer ID as the tblCustomer record i wish to delete and that a 2nd field in tblRental isnt equal to "Open"
i have no idea how to go about this, any help would be greatly appreciated.
Last edited: