apply % discount to currency value

You would have needed to change the Column Count and Column Widths properties on the Format tab of the property sheet for the ComboBox.
 
In the AfterUpdate event of the Discount1 ComboBox put:
Code:
If Me.Discount1.Column(5) Then
   Me.AA = Me.A - (Me.A * Me.Discount1.Column(6))
Else
   Me.AA = Me.A - Me.Discount1.Column(6)
End If
 
Last edited:
Ok Rural Guy i have done that
 
It should now do as you wanted. You may wish to disable the ComboBox until there is a valid value in the Me.A control but that is up to you.
 
Sorry rural Guy but is it possible to display the amount discounted in the field [TD].

And can i hide the columns in the combo box so that they are not visible
 
No i didn't fall asleep i lost my Internet connection.

P.S its 1.20am here
 
Sorry. It happens here in the states as well. Is your form working?
 
Sorry rural Guy but is it possible to display the amount discounted in the field [TD].

then i will add it to the total tomorrow
 
Sorry rural Guy but is it possible to display the amount discounted in the field [TD].

And can i hide the columns in the combo box so that they are not visible
Sure. Change your AfterUpdate event code to:
Code:
If Me.Discount1.Column(5) Then
   Me.AA = Me.A - (Me.A * Me.Discount1.Column(6))
   Me.[TD] = (Me.A * Me.Discount1.Column(6)) * -1
Else
   Me.AA = Me.A - Me.Discount1.Column(6)
   Me.[TD] = Me.Discount1.Column(6) * -1
End If
...and hiding the columns in a ComboBox is simply setting the ColumnWidth to 0" for that column.
 
I Will

Thanks for your Help this problem has been bugging me for months

i can now tell my boss that i can get it finished for the end of September
 
You're certainly welcome. Glad I could help. You're a quick learner.
 

Users who are viewing this thread

Back
Top Bottom