J
Jay
Hey all,
I know the typical response that I will see with this post is build a
query, but in this database, I need to limit the amount of queries I
have, and I know that what I want to do is possible using code, but
can't seem to word it right.
My situation is, I have a table for orders placed, and a table with
the part number and three amounts; shipping cost, wholesale cost, and
markup. On my orders form, I have a combo box that has all of the
fields from the part number table. When someone selects the part from
the list, I want a total cost appear, totalling the bound columns from
the combo box. The reason for this I do not want the person placing
the order to see the markup costs. I have created a code that updates
the cost field with one of the amounts, but when I try to add them all
together. This is what I have:
Private Sub partnumber_AfterUpdate()
Me.totalcost.Value = Me.partnumber.Column(2) +
Me.partnumber.Column(3) + Me.partnumber.Column(4)
End Sub
This takes the total from each field and combines then in the same
field box, i.e.
Shipping Wholesale Markup
$5.00 $349.00 $15.00
and displays it like this:
$534915.00 (all of the amounts side by side)
Any help would be appreciated
Jason
I know the typical response that I will see with this post is build a
query, but in this database, I need to limit the amount of queries I
have, and I know that what I want to do is possible using code, but
can't seem to word it right.
My situation is, I have a table for orders placed, and a table with
the part number and three amounts; shipping cost, wholesale cost, and
markup. On my orders form, I have a combo box that has all of the
fields from the part number table. When someone selects the part from
the list, I want a total cost appear, totalling the bound columns from
the combo box. The reason for this I do not want the person placing
the order to see the markup costs. I have created a code that updates
the cost field with one of the amounts, but when I try to add them all
together. This is what I have:
Private Sub partnumber_AfterUpdate()
Me.totalcost.Value = Me.partnumber.Column(2) +
Me.partnumber.Column(3) + Me.partnumber.Column(4)
End Sub
This takes the total from each field and combines then in the same
field box, i.e.
Shipping Wholesale Markup
$5.00 $349.00 $15.00
and displays it like this:
$534915.00 (all of the amounts side by side)
Any help would be appreciated
Jason