Storing data in a table

  • Thread starter Thread starter D Kucey
  • Start date Start date
D

D Kucey

I am using a combo box on a form to enter data. The name
that I chose in the combo box also has a value to it. Ex.
I chose Product 1 and it comes with a price of $25. My
price of course comes from my Products table.


My problem is that I want to store that price in a Orders
Details table. The tricky part is that I want to be able
to change that price later on if I want to so I can give
the customer a discount and without touching the Products
table.

I have been looking at the Northwinds db and I can not
figure out how they do it with the Orders form. I want
to use the same concept, where I click on a product and
the unit price automatically comes up. That unit price
comes from the Products table and is stored in the Order
Details table but it can be changed if desired.

Any help would greatly be appreciated.
Thanks
 
My problem is that I want to store that price in a Orders
Details table. The tricky part is that I want to be able
to change that price later on if I want to so I can give
the customer a discount and without touching the Products
table.

The easiest way is to attach some code to the cboChooseAProduct_AfterUpdate
event which looks up the current price in the table and pushes it to the
txtPriceCharged textbox on the form.

HTH


Tim F
 
Back
Top