Food Menu


Private Sub chkExtraCheese_Click()
cmdCalculate_Click
End Sub

Private Sub chkOlives_Click()
cmdCalculate_Click
End Sub

Private Sub chkOnions_Click()
cmdCalculate_Click
End Sub

Private Sub chkPepperoni_Click()
cmdCalculate_Click
End Sub

Private Sub chkSausage_Click()
cmdCalculate_Click
End Sub

Private Sub cmdCalculate_Click()
Dim dblSmall As Double
Dim dblMedium As Double
Dim dblLarge As Double

Dim dblPepperoni As Double
Dim dblSausage As Double
Dim dblExtraCheese As Double
Dim dblOnions As Double
Dim dblOlives As Double

Dim dblBuffaloWings As Double
Dim dblBread As Double

Dim dblPepsi As Double
Dim dblDietPepsi As Double
Dim dblSprite As Double
Dim dblOrangeJuice As Double
Dim dblRootBeer As Double

Dim dblTotal As Double

If optSmall = True Then
dblSmall = CDbl(txtSmall)
Else
dblSmall = 0
End If
If optMedium = True Then
dblMedium = CDbl(txtMedium)
Else
dblMedium = 0
End If
If optLarge = True Then
dblLarge = CDbl(txtLarge)
Else
dblLarge = 0
End If

If chkPepperoni = 1 Then
dblPepperoni = CDbl(txtPepperoni)
Else
dblPepperoni = 0
End If
If chkSausage = 1 Then
dblSausage = CDbl(txtSausage)
Else
dblSausage = 0
End If
If chkExtraCheese = 1 Then
dblExtraCheese = CDbl(txtExtraCheese)
Else
dblExtra = 0
End If
If chkOnions = 1 Then
dblOnions = CDbl(txtOnions)
Else
dblOnions = 0
End If
If chkOlives = 1 Then
dblOlives = CDbl(txtOlives)
Else
dblOlives = 0
End If

dblBuffaloWings = CDbl(txtQtyBuffaloWings) * CDbl(txtBuffaloWings)
dblBread = CDbl(txtQtyBread) * CDbl(txtBread)
dblPepsi = CDbl(txtQtyPepsi) * CDbl(txtPepsi)
dblDietPepsi = CDbl(txtQtyDietPepsi) * CDbl(txtDietPepsi)
dblSprite = CDbl(txtQtySprite) * CDbl(txtSprite)
dblOrangeJuice = CDbl(txtQtyOrangeJuice) * CDbl(txtSprite)
dblRootBeer = CDbl(txtQtyRootBeer) * CDbl(txtRootBeer)

dblTotal = dblSmall + dblMedium + dblLarge + _
dblPepperoni + dblSausage + dblExtraCheese + dblOnions + dblOlives + _
dblBuffaloWings + dblBread + _
dblPepsi + dblDietPepsi + dblSprite + dblOrangeJuice + dblRootBeer

txtTotalBWings = dblBuffaloWings
txtTotalBread = dblBread
txtTotalPepsi = dblPepsi
txtTotalDPepsi = dblDietPepsi
txtTotalSprite = dblSprite
txtTotalOJ = dblOrangeJuice
txtTotalRBeer = dblRootBeer
txtTotalOrder = Format(dblTotal, “Currency”)
End Sub

Private Sub cmdExit_Click()
End
End Sub

Private Sub Form_Resize()
Me.Height = 5115
Me.Width = 6240
End Sub

Private Sub optLarge_Click()
cmdCalculate_Click
End Sub

Private Sub optMedium_Click()
cmdCalculate_Click
End Sub

Private Sub optSmall_Click()
cmdCalculate_Click
End Sub

Private Sub txtQtyBread_LostFocus()
cmdCalculate_Click
End Sub

Private Sub txtQtyBuffaloWings_LostFocus()
cmdCalculate_Click
End Sub

Private Sub txtQtyDietPepsi_LostFocus()
cmdCalculate_Click
End Sub

Private Sub txtQtyOrangeJuice_LostFocus()
cmdCalculate_Click
End Sub

Private Sub txtQtyPepsi_LostFocus()
cmdCalculate_Click
End Sub

Private Sub txtQtyRootBeer_LostFocus()
cmdCalculate_Click
End Sub

Private Sub txtQtySprite_LostFocus()
cmdCalculate_Click
End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s