Yeah, I really don't get it. I rem'd the whole thing to expressly return "10.3", and the query changed it into that double. My original procedure returned "10.3", and it showed up goofy in the query. This procedure returns "10.3", and the query gets it right. (Beat head on desk.)
But it works...
In the off-chance anyone's still tuned in ... I found the following chasing links originally provided by 1DMF. It replaces my wonky code, and for some reason it works when mine didn't. Even though I swear both are returning the exact same results!
Public Function bakRoundData(inputData As...
It runs with "LOG" instead of "LOG10". But I get a lot of "#Error" results (looks like all returns > ~20). And many results have the wrong sig figs.
Exporting the data to Excel and then modifying the formulas for correct cell references: it runs great. Even with "LOG" instead of "LOG10".
I...
? csng("10.3000001907349")
10.3
> Perhaps this will help
Interesting. I could use that in the few times I need this in a query. I'd like to divorce the query defs from the code anyway.
But I'm getting an error: "Undefined function "Log10" in expression." I have Excel 12 Object Library in...
> If you only want one decimal,
No, I need three significant figures, for a wide range of numbers.
> I'm just wondering if the end query is picking up data typing from either the var in your UDF or from the initial SQL column.
I don't use vars -- the procedure (before I changed it) returns a...
I'd get 10.311. In my procedure, the 3 indicates 3 sig figs, not the third decimal place. My procedure figures out that I really need (in this case, 10.3).
Otherwise, the procedure does just what you say; and it definitely returns 10.3 correctly. It goes goofy in the query.
The...
Okay, this is weird.
This is a field in my query:
cfs: bakRoundData((tblDischarge.WaterDischargeRateMeasure*35.3147),3)
A particular row value of tblDischarge.WaterDischargeRateMeasure is 0.292. Take that times 35.3147 for 10.3118924.
bakRoundData correctly applies Round(10.3118924, 1)...
For starters, don't put in anything that's redundant. Google "database table normalization" for simple steps to make your tables much more elegant. Trust me, you want to put some effort into this.
So don't put in a start date if you already know it's 181 before the end data. Instead, just...
Thanks for the reply.
> No null value in tblDischarge.WaterDischargeRateMeasure ?
No. Normalized, and a measurement is necessary to enter a record. Table rule requires a measurement. Zero is a valid measurement.
> What happens if you comment out the On Error GoTo statement ?
In most cases...
Noob here. I did try Search first.
I have an MS Access app developed 2005. Now running it in 2007.
I have a query that calls a procedure:
cfs: bakRoundData((tblDischarge.WaterDischargeRateMeasure*35.3147),3)
The field name "cfs" is a water flow measurement that I'm converting from "cms", which...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.