# Thread: Mathematical formulae (2002 (10.2616.2625))

1. ## Mathematical formulae (2002 (10.2616.2625))

i have made my self a database for school and i am trting to set it up so that the estimated cost is changed auto mattically i havent got a clue how to do this but i know it can be done because i have seen it.
in the attachement i have a two fileds problem type and estimated cost now i would like to set it up so that depending on what problem i have the price changes to suite the problem and i would also like it so that i have a box that lets me say howmany computers to fix wich say it was 2 the price would be doubled etc. plz help

2. ## Re: Mathematical formulae (2002 (10.2616.2625))

You need to create a table (if you haven't already done so) that relates problem type to cost:

<table border=1><td>ProblemID</td><td>ProblemType</td><td>Cost</td><td align=right>1</td><td>Network</td><td align=right>150</td><td align=right>2</td><td>Printer</td><td align=right>50</td><td align=right>3</td><td>Software</td><td align=right>100</td></table>
Set the Row Source property of the combo box to the name of this table. You want to see the problem type, not the ProblemID, and you want to be able to refer to the cost, so set Column Count to 3 and Column Widths to 0",1",0".

Set the Control Source of the text box for the cost to

=[cbxComboName].[Column](2)

where cbxComboName is the name of the combo box. (You must use Column(2) because the columns are numbered starting at 0.) You can add another text box for the number of computers, and a text box for the total cost. The Control Source for the latter would be

=[txtCost]*[txtNumber]

where txtCost and txtNumber are the names of the text boxes containing the cost per computer and the number of computers, respectively.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•