The Product table has the current Price. And that Price can/will change with time.
So, you could copy the Product Price to AgreedToPrice.
I don't know how you input/processing procedures work. The user will input the Discount???
Please tell us more.
This is one of those times where details of the process would be helpful to readers. It would provide business context.
To me, you sell X quantity of Product W, the Price at that time is S dollars per Item of W.
So the "price" is S. If you agree to a 10% discount for whatever reason, then the AgreedToPrice is .9S.
I don't understand how, after the fact (it seems), the user determines some sort of Discount??????User selects product from a combobox - named cboProduct. The combobox can have a column with the product price. Code can grab that price and save to record. Refer to combobox column by index. If price is in second column, its index is 1.
Me!AgreedtoPrice = Me.cboProduct.Column(1)
This code would go in the AfterUpdate event of cboProduct. It is VBA syntax. There is macro equivalent.
User can edit the AgreedtoPrice in bound textbox if you want to allow that.Thank you so much, so it'll need vba code, combobox in order to do so... I'll try it... Wait for the good news 😄Sure.
You need some processes to do certain things.
If you sell some Product X, you will need to record the current Price of Product X in AgreedToPrice.
You will need to record the quantity of Product X involved.
When you report or query your data, you will have to calculate
AgreedToPrice * Quantity (* Discount) to get Total
If you are intent on recording Discount, then you need some mechanism to record it in each record.
If you default to 1, then if a user wants/inputs 10%, then your logic will have to deal with the actual discount rate.
AgreedToPrice * Quantity (* Discount) to get Total
AgreedToPrice * Quantity (* (1-.1) to get Total where .1 represents 10% discount (or 90% of agreedToPrice)
Before you use combo or anything else, sort out your logic.
What exactly are you going to do? and Where?
-make a sale
-identify Product
-identify Product Price
-identify quantity
create a sale record.... record agreedtoprice, quantity,discount.....
Hi June,User selects product from a combobox - named cboProduct. The combobox can have a column with the product price. Code can grab that price and save to record. Refer to combobox column by index. If price is in second column, its index is 1.
Me!AgreedtoPrice = Me.cboProduct.Column(1)
This code would go in the AfterUpdate event of cboProduct. It is VBA syntax. There is macro equivalent.
User can edit the AgreedtoPrice in bound textbox if you want to allow that.
The code works perfectly, because in combobox value the 1st column : the PK Product (hidden), 2nd column BarcodeID (user choose this), 3rd column SellPrice (which will be as AgreedToPrice). i change it to
Me!AgreedtoPrice = Me.cboProduct.Column(2)
![]()