skwilliams
Registered User.
- Local time
- Today, 10:16
- Joined
- Jan 18, 2002
- Messages
- 516
I have a select case statement that is pulling the wrong value.
QuSe1 is returning a value of 2.5 but it should be 3.25
Here's the code (I've put the values of each field in red and enclosed with asterisks for illustration):
The criteria being matched are that of the 2nd select case statement, but it seems to be using the equation from the 1st select case statement.
I inserted a breakpoint and ran the code, it verified that the 2nd statement should be used based on the criteria.
Any ideas??
QuSe1 is returning a value of 2.5 but it should be 3.25
Here's the code (I've put the values of each field in red and enclosed with asterisks for illustration):
Code:
Select Case Quality
Case BiNeOs.Visible = False[COLOR="Red"]*True*[/COLOR], NeIS [COLOR="Red"]*2*[/COLOR] > 0
QuSe1[COLOR="Red"]*2.5*[/COLOR] = ((IsRating[COLOR="Red"]*4*[/COLOR] * 0.25) + (OsRating[COLOR="Red"]*2*[/COLOR] * 0.75))
Case BiNeOs.Visible = True[COLOR="Red"]*True*[/COLOR], NeIS [COLOR="Red"]*2*[/COLOR]> 0
QuSe1[COLOR="Red"]*2.5*[/COLOR] = ((IsRating[COLOR="Red"]*4*[/COLOR] * 0.25) + (((BiOsRating[COLOR="Red"]*4*[/COLOR] + OsRating[COLOR="Red"]*2*[/COLOR]) / 2) * 0.75))
Case BiNeOs.Visible = False[COLOR="Red"]*True*[/COLOR], NeIS [COLOR="Red"]*2*[/COLOR]= 0
QuSe1[COLOR="Red"]*2.5*[/COLOR] = OsRating[COLOR="Red"]*2*[/COLOR]
Case BiNeOs.Visible = True[COLOR="Red"]*True*[/COLOR], NeIS [COLOR="Red"]*2*[/COLOR]= 0
QuSe1[COLOR="Red"]*2.5*[/COLOR] = (BiOsRating[COLOR="Red"]*4*[/COLOR] + OsRating[COLOR="Red"]*2*[/COLOR]) / 2
End Select
The criteria being matched are that of the 2nd select case statement, but it seems to be using the equation from the 1st select case statement.
I inserted a breakpoint and ran the code, it verified that the 2nd statement should be used based on the criteria.
Any ideas??