Unanswered: Need urgent help with checkbox updater PLZ!!!!!
My database is almost done, i gotta say access is awesome. I racked my brains but jus need 1 last thing. I got this add accessories form. I have all these checkboxes which are based on a field in a table. I need it so that each checkbox has a price assigned to it. So when i buy an ipod for example, it will add on to the tota price. Any1 kno how to do this??? Im stumped! All help is appreciated, cheers :-)
There are a few different ways to approach this, but if you add a "submit order" button or the like to your form, then you can use an event procedure to calculate and store the order total when the button is clicked. If you have an OrderTotal field in the table your form is based on, then you would just set the value of OrderTotal = price1*qty1 + price2*qty2... The calculation can be done in a loop, a lengthy equation, or by using queries. I reccommend against the lengthy equation option.
You might want to have a lookup table for the current pricing -- but since pricing has a tendancy to change (especially on gadgets like iPods), you should store the calculated value. That way, if you're looking up the total amount of the order later it will reflect the total at the time of purchase, not what it would have been with the new pricing.