Re: Help - Decypher this formula
- From: "BruceM" <bamoob@xxxxxxxxxxxxxxxx>
- Date: Thu, 25 Sep 2008 14:04:04 -0400
Multiplying by 1 makes no sense at all, since it will give you what you started with. Adding .5 to the result and wrapping it in the Int function seems to be serving to round the number, but in that case you may as well use the Round function. NewFlag may be a Yes/No field, where the -1 equals True and 0 equals false. It may be possible to reduce this expression to something like:
IIf([NewFlag]=True,Round(([rate]*12)/26),Null)
Actually, I think it could be:
IIf([NewFlag]=True,Round([rate]*12/26),Null)
You could try putting the new formula in there, and seeing if it gives the same result as the old one.
I agree that this sounds like something that is coming up with a bi-weekly value, but I also agree that without context there is not much more to say. You could try finding a form or report that is bound to this query, and seeing if the calculated field is being used as a control source for a text box (most likely, I think). With any luck the text box has a label that will explain something.
Diagnostic tools, as suggested, may be a good choice.
"Dazed And Confused" <SimonJester@xxxxxxxxxxxxxx> wrote in message news:1aa68aec-8f1a-4ef0-83b0-b7ce5a1d90a1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thank you all for your help. We apologize, we accidently left out the
final part - we think - it would be "Null" as in: IIf([NewFlag]=-1,
(Int((((([rate]*1)*12)/26)*100)+0.5)/100),NULL).
*
We "think" this has to do with some kind of payroll deduction
calculation - United Way maybe? And we don't know what the "NewFlag"
is. the reason we don't know for sure is because the database holding
this has about about a zillion strangely-named queries in it and no
documentation as to what they are supposed to do - or even if they are
still being used.
*
Again - thank you.
Mike & Jeff
On Sep 24, 9:23 am, Dazed And Confused <SimonJes...@xxxxxxxxxxxxxx>
wrote:
We ran across a formula in a query that someone else wrote that we are
embarassed to admit we just do not understand. We tried to find
something on Google, but didn't know how to phrase the search. Any
help anyone could give to help understand what this formula is doing
and how it works would be so appreciated.
Here goes: This formula is in the "Field:" row in a query:
IIf([NewFlag]=-1,(Int((((([rate]*1)*12)/26)*100)+0.5)/100)
Thank you!
Mike and Jeff
.
- References:
- Help - Decypher this formula
- From: Dazed And Confused
- Re: Help - Decypher this formula
- From: Dazed And Confused
- Help - Decypher this formula
- Prev by Date: RE: Yes/No Display
- Next by Date: RE: Yes/No Display
- Previous by thread: Re: Help - Decypher this formula
- Next by thread: Confusing Error Message - Please decypher
- Index(es):
Relevant Pages
|