Delete Duplicate Detail Record

Gorio

Registered User.
Local time
Today, 21:26
Joined
Sep 26, 2000
Messages
33
I am building a database patterned directly from NorhtWinds. In the "Order Detail" table the primary key is based on 2 fields. This will not allow a duplicate product to be ordered, but it waits until after the update to advise you. Also it requires that another product be ordered instead of allowing a deletion of that record.

What I want is to determine prior to updating that that product already be determined as previously ordered and delete the current addition of the product.

The scenario I'm trying to prevent is as you are adding products to be ordered, say Aniseed, you find that you already have that ANiseed ordered. If this is your last product you now have to choose something else and then delete it. I need the secnod Aniseed to be deleted. Or perhaps it should not show as a choice in the combo box once it has already been choosen once. Either method would work.

Any ideas or suggestions?
 

Users who are viewing this thread

Back
Top Bottom