A
Anthony Viscomi
Is there a better way of writing the following IF statements?
Private Sub Front_Material_AfterUpdate()
If Me.Front_Style.Value = "Albany" And Me.Front_Material.Value = "Maple"
Then
Me.Front_.Value = -0.15
End If
If Me.Front_Style.Value = "Albany" And Me.Front_Material.Value = "Cherry"
Then
Me.Front_.Value = -0.09
End If
If Me.Front_Style.Value = "Alpha" Then
Me.Front_.Value = -0.6
End If
If Me.Front_Style.Value = "Prairie" And Me.Front_Material.Value = "Maple"
Then
Me.Front_.Value = -0.24
End If
If Me.Front_Style.Value = "Prairie" And Me.Front_Material.Value = "Oak" Then
Me.Front_.Value = -0.27
End If
If Me.Front_Style.Value = "Prairie" Then
Me.Front_.Value = -0.6
End If
End Sub
I have about 15 more of these Front_Styles to add and I was wondering if
there was a different/easier way to write this and still achieve the same
results.
Thanks!
Anthony Viscomi
Private Sub Front_Material_AfterUpdate()
If Me.Front_Style.Value = "Albany" And Me.Front_Material.Value = "Maple"
Then
Me.Front_.Value = -0.15
End If
If Me.Front_Style.Value = "Albany" And Me.Front_Material.Value = "Cherry"
Then
Me.Front_.Value = -0.09
End If
If Me.Front_Style.Value = "Alpha" Then
Me.Front_.Value = -0.6
End If
If Me.Front_Style.Value = "Prairie" And Me.Front_Material.Value = "Maple"
Then
Me.Front_.Value = -0.24
End If
If Me.Front_Style.Value = "Prairie" And Me.Front_Material.Value = "Oak" Then
Me.Front_.Value = -0.27
End If
If Me.Front_Style.Value = "Prairie" Then
Me.Front_.Value = -0.6
End If
End Sub
I have about 15 more of these Front_Styles to add and I was wondering if
there was a different/easier way to write this and still achieve the same
results.
Thanks!
Anthony Viscomi