changing combo box item

totolkhan

Registered User.
Local time
Today, 07:12
Joined
May 23, 2005
Messages
30
hi ,
i have a fro example menu and price database
that i entered Menu items and price of each other in it

and i linked this database to a order form that when i select for example capuchino it will give me 1 $ on price field

but the problem is here that when i whant to change the prices all of the past entered orders with last price will change to new one
how can i fix it ?
thanks
 
I assume that you have the table that is the souce for the combo box and the menu table linked by relationship and that you only store the pk from the "combo Table" in the "Menu Table".

If I am correct then when you change a price in the "Combo Table" it will be reflected in ALL the records in the "Menu Table".

The answer is to store the Price in the Menu table with the PK, this is one of the few time it is acceptable to store duplicate data ( If I'm incorrect a Guru will point out my error).
 
yes , you are right .
but would u please explain it to me ,
what is PK !?
thanks
 
totolkhan,

Sorry I should have explained PK is the Primary Key

Open you table and you will see it is the field with with little key to the left.

I am off to bed now (12:41am) , but will post you about this time - 4 hours (8:00PM my time) a database sample that will do what you want and also allow you to write your prices up or down.
 
Here is the sample I promised last night; It will open at an invoice form , just close it and you will see the other forms one of which does the price updating.

Have a look in the tblOrderDetails and you will see what it saves (re the price), also have a look at the sfrmOrdersDetail and see how the data is drawn from different tables (via Query).

If this help you, then you owe me one Capuchino .

Any questions - post back
 
Last edited:

Users who are viewing this thread

Back
Top Bottom