If / Then can be done in two ways
1 is by using VB event call and the following should work....
If Forms![Quote Entry].SumOfPremiums = Forms![Quote Entry].QuotePremium Then
GoTo Yes_PrintScheduleReportButton_Click
Else GoTo Ask_PrintScheduleReportButton_Click
End If.
If you wish to use an function (one of the Access Built-in ones) to do some logic then the following function can be used...
IIf Function
Returns one of two parts, depending on the evaluation of an expression.
Syntax
IIf(expr, truepart, falsepart)
The IIf function syntax has these named arguments:
Part Description
expr Required. Expression you want to evaluate.
truepart Required. Value or expression returned if expr is True.
falsepart Required. Value or expression returned if expr is False.
Remarks
IIf always evaluates both truepart and falsepart, even though it returns only one of them. Because of this, you should watch for undesirable side effects. For example, if evaluating falsepart results in a division by zero error, an error occurs even if expr is True.
Check out the help that comes with MS Access (it is invaluable if you are new to programming).
Hope this helps..
m