Results 1 to 2 of 2
2003-11-19, 12:00 #1
- Join Date
- Oct 2003
- maidstone, Kent, England
- Thanked 0 Times in 0 Posts
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
2003-11-19, 12:14 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
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:
<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
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
where txtCost and txtNumber are the names of the text boxes containing the cost per computer and the number of computers, respectively.