some thoughts:
- for one case, maybe Val is not returning an expected number (in which case, it would return 0)
- I would print the sql and check it, but I also favor single quotes over doubling up on doubles.
Code:
strtest = "Select star from tbl_stars Where submeasure = '" & "MRP" & "'" and " & _
CInt(Val(Me.txtbmi3) * 100) & " Between low and high"
debug.print strtest
You could restrict the print to when a certain criteria value (MRP?) is being used, or just scan 14 outputs in the immediate window. If nothing obvious shows, I'd test the variables and expressions in the immediate window in break mode, such as
?CInt(Val(Me.txtbmi3) * 100)
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.