Can't change records for reason of referential integrity

odrap

Registered User.
Local time
Tomorrow, 00:21
Joined
Dec 16, 2008
Messages
156
In my program for booking orders,i have a special table "tblSpecPrices" with three fields:
KlntID, Artnr, SpecPrice
If for a client a special price is foreseen for a particular article, then there's a record with these data saved in this table.
When such a client put an order, the program is consulting this table to see if for this client and the article she or he ordered, a special price exists.
If so, this price is taken and put in the order instead of the normal selling price.
If one moment for some reason the value of the special price has to be changed, the user of the program go to a form "frmSpecprices",into which there is a combobox that makes it possible for the user to select a client.When she or he has selected a client, in a listbox on the same form all articles and special prices that are valid for this particular client appear.
When the user try to change the price of one of these articles and there exists already booked order(s) of this article for this client , there's no way to change the special price of this article. A message tells the user that for reasons of referential integrity the change can't be done.
What to do, to remain the possibility to have a table with special prices for particular clients, and to have the possibility to change if neccessary the selling price of one or more articles, even if there exists already booked orders of this article for this client?
 

Users who are viewing this thread

Back
Top Bottom