Jul 19 2021 02:04 AM
So I am tryting to do Select
Right(Left([NUMBER]*0.65-Int([NUMBER]*0.65),4),1)
to get the 4th character ( so the 2nd decimal place, e.g. to return {3} from {1.234}) of this resulting number in a query. I found that it would actually return {4} (that is, the 5th character) because the Left function didn't count decimal point as a character. The funniest thing is I copied this function straight from collegues and it worked just as expected on every others' devices. I don't think I have ever touched any settings even though I think its something woring in the settings.
Any help please:( Thanks a lot.
Jul 19 2021 12:53 PM
Jul 20 2021 11:23 PM
@Eric_1226 : I can't replicate your issue. But, that said, always handle numbers as numbers, not text.
Thus:
Digit2 = Int([NUMBER]*0.65*100) Mod 10
Jul 21 2021 04:13 AM
Jul 21 2021 04:14 AM
Jul 21 2021 06:13 PM
@isladogs Thank you guys. Those were valuable recommendations. Though NUMBER was just an example. All of your simplifications would definitely get the job done but I would still very much like to figure out why my device keeps returning different result from other devices and why the LEFT function don't count decimal points as other devices do. I have like 20 different Access and it looks like I will just have to change code for em all.
Jul 21 2021 06:15 PM
Jul 21 2021 11:25 PM