jesus4u
Feb 27th, 2001, 12:22 PM
What is the correct way to code the sum of these variables?
Dim intEarlyBird
Function EarlyRegPrice()
Dim intReg1, intReg2, intReg3
Select Case strReglType 'registration type from the first grouping
Case Individual
intReg1 = 105
Case Spouse
intReg1 = 95
Case ActivePulpitPastor
intReg1 = 75
Case SpecialStudentRate
intReg1 = 75
Case Else --
Response.Redirect "ErrorType.asp"
End Select
Select Case strReg2Type 'registration type from the second grouping
Case Individual
intReg2 = 105
Case Spouse
intReg2 = 95
Case ActivePulpitPastor
intReg2 = 75
Case SpecialStudentRate
intReg2 = 75
Case Else --
Response.Redirect "ErrorType.asp"
End Select
Select Case strReg3Type 'registration type from the third grouping
Case Individual
intReg3 = 105
Case Spouse
intReg3 = 95
Case ActivePulpitPastor
intReg3 = 75
Case SpecialStudentRate
intReg3 = 75
Case Else --
Response.Redirect "ErrorType.asp"
End Select
intEarlyBird = sum(intReg1 - intReg16)
Dim intEarlyBird
Function EarlyRegPrice()
Dim intReg1, intReg2, intReg3
Select Case strReglType 'registration type from the first grouping
Case Individual
intReg1 = 105
Case Spouse
intReg1 = 95
Case ActivePulpitPastor
intReg1 = 75
Case SpecialStudentRate
intReg1 = 75
Case Else --
Response.Redirect "ErrorType.asp"
End Select
Select Case strReg2Type 'registration type from the second grouping
Case Individual
intReg2 = 105
Case Spouse
intReg2 = 95
Case ActivePulpitPastor
intReg2 = 75
Case SpecialStudentRate
intReg2 = 75
Case Else --
Response.Redirect "ErrorType.asp"
End Select
Select Case strReg3Type 'registration type from the third grouping
Case Individual
intReg3 = 105
Case Spouse
intReg3 = 95
Case ActivePulpitPastor
intReg3 = 75
Case SpecialStudentRate
intReg3 = 75
Case Else --
Response.Redirect "ErrorType.asp"
End Select
intEarlyBird = sum(intReg1 - intReg16)