I am wondering whether it would be possible to add in a discount for 5 of any items (e.g 3 or item 1 and 2 of item 2); or whether having a discount for 5 of item 1 and 5 of item 2 would be easier to code.
The code that i currently have to calculate the total price for all items is:
Expand|Select|Wrap|Line Numbers
- Private Sub cmdTotalPrice_Click()
- Dim TotalPrice As DAO.Recordset
- Dim db As Database
- Set db = CurrentDb
- Set TotalPrice = db.OpenRecordset("qryOrderLine", dbOpenDynaset)
- TotalPrice.Edit
- Do While Not TotalPrice.EOF
- If (TotalPrice.Fields.Item("Sales ID").Value = Me!txtSaleID) Then
- totalpricefororder = totalpricefororder + TotalPrice.Fields.Item("Total Price").Value
- End If
- TotalPrice.MoveNext
- Loop
- txtTotalPrice = totalpricefororder
- End Sub