Hi there,
I have a form for printing costs. I have fields called PrintSize, Quantity and PrintCost. The PrintSize field is a combo box which looks at the values in another table called Printing. The table called printing has a papersize column and a cost column, e.g.
A1 - £4.00
A2 - £3.00 etc.
I want my PrintCost field to automatically be calculated from the PrintSize & Quantity fields by looking at the Printing table. I tried this:
Dim SqlStr As String
SqlStr = "SELECT [Cost] FROM [Printing] WHERE [PaperSize] = '" & PrintSize.Value & "';"*Me.Quantity
PrintCost.Value = SqlStr
PrintCost.Requery
I dont really understand how to use 'Dim' correctly?
Any ideas????
I have a form for printing costs. I have fields called PrintSize, Quantity and PrintCost. The PrintSize field is a combo box which looks at the values in another table called Printing. The table called printing has a papersize column and a cost column, e.g.
A1 - £4.00
A2 - £3.00 etc.
I want my PrintCost field to automatically be calculated from the PrintSize & Quantity fields by looking at the Printing table. I tried this:
Dim SqlStr As String
SqlStr = "SELECT [Cost] FROM [Printing] WHERE [PaperSize] = '" & PrintSize.Value & "';"*Me.Quantity
PrintCost.Value = SqlStr
PrintCost.Requery
I dont really understand how to use 'Dim' correctly?
Any ideas????