Hi there,
I have a form showing printing information. I have a field called 'Quantity', one called 'Papersize' and one called 'PrintCost'. The PaperSize field is a combo, that takes its values from another table called PrintCosts. This table shows different types of paper size, with a corresponding 'Cost' field showing price per sheet. After the papersize has been chosen and quantity has been updated, i would like the PrintCost field to automatically be updated by taking the papersize and multiplying it by the quantity and come up with a total print cost by looking at the PrintCost table. I have tried this in the Quantity afterupdate event:
Dim dblCost As Double
dblCost = Me.Quantity * Nz(DLookup("[Cost]", "PrintCosts", "[PaperSize] = '" & Me.PrintSize & "'"), 0)
Me.PrintCost.Value = dblCost
I am getting: "Run-Time error 2001: you cancelled the previous operation"
Any ideas?