There are two kinds of If statement, the single
Note: Because of the use of line
Rem Single-l ine If example 1 Rem Same result as multi-l ine If example 1 If {Employee.Dept} = "Sales" Then _ formula = {Employee.Salary} * 0.06 _ Else _ formula = {Employee.Salary} * 0.04
Here is an example showing various forms of single
Rem Single-l ine If example 2 Dim per As Number, extra As Boolean per = 2 : extra = False 'An example with no Else clause If {Employee.Dept} = "Sales" Then per = 10 'More than 1 statement in the Then or Else part can 'be included by separating them with colons If {Employee.Dept} = "R&D" Then _ per = 5 : extra = True _ Else _ per = 3
Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com |