It appears that I am ALMOST rewriting the same code - is there an easier way to code this than all these IF's?
'------CODE SNIPPET----------------
' Did they order just one job?
IF multiple_quantity = 1 THEN
' Determine Hire Type
IF multiple_hire_type = "D" THEN
' Direct Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("direct1"
.Value)
ELSE
' Contract Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("contract1"
.Value)
END IF
END IF
' Do they want between 2-10 job openings?
IF multiple_quantity >1 AND multiple_quantity<=10 THEN
' Determine Hire Type
IF multiple_hire_type = "D" THEN
' Direct Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("direct2"
.Value)
ELSE
' Contract Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("contract2"
.Value)
END IF
END IF
' Do they want between 11-25 job openings?
IF multiple_quantity >10 AND multiple_quantity<=25 THEN
' Determine Hire Type
IF multiple_hire_type = "D" THEN
' Direct Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("direct3"
.Value)
ELSE
' Contract Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("contract3"
.Value)
END IF
END IF
' Do they want between 11-25 job openings?
IF multiple_quantity >= 50
' Determine Hire Type
IF multiple_hire_type = "D" THEN
' Direct Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("direct4"
.Value)
ELSE
' Contract Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("contract4"
.Value)
END IF
END IF
' Calculate the Price and Total
total = multiple_quantity * priceEach
'------CODE SNIPPET----------------
' Did they order just one job?
IF multiple_quantity = 1 THEN
' Determine Hire Type
IF multiple_hire_type = "D" THEN
' Direct Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("direct1"
ELSE
' Contract Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("contract1"
END IF
END IF
' Do they want between 2-10 job openings?
IF multiple_quantity >1 AND multiple_quantity<=10 THEN
' Determine Hire Type
IF multiple_hire_type = "D" THEN
' Direct Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("direct2"
ELSE
' Contract Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("contract2"
END IF
END IF
' Do they want between 11-25 job openings?
IF multiple_quantity >10 AND multiple_quantity<=25 THEN
' Determine Hire Type
IF multiple_hire_type = "D" THEN
' Direct Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("direct3"
ELSE
' Contract Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("contract3"
END IF
END IF
' Do they want between 11-25 job openings?
IF multiple_quantity >= 50
' Determine Hire Type
IF multiple_hire_type = "D" THEN
' Direct Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("direct4"
ELSE
' Contract Hires
priceEach = FormatCurrency(jobOpeningPrices.Fields.Item("contract4"
END IF
END IF
' Calculate the Price and Total
total = multiple_quantity * priceEach