If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
round Fraction
Greeting,
I have the following fraction need to be rounded if they met cretin conditions: From 0.01 to 0.019 = 0 0.20 to 0.39 =0.25 0.40 to 0.60 =0.50 How to do that in form please?? |
#2
|
|||
|
|||
round Fraction
SomeName: IIf([TableName]![YourNumberField] Between 0.01 And
0.19,0,IIf([TableName]![YourNumberField] Between 0.2 And 0.39,0.25,IIf([TableName]![YourNumberField] Between 0.4 And 0.6,0.5))) -- Wayne Manchester, England. "ghost" wrote: Greeting, I have the following fraction need to be rounded if they met cretin conditions: From 0.01 to 0.019 = 0 0.20 to 0.39 =0.25 0.40 to 0.60 =0.50 How to do that in form please?? |
#3
|
|||
|
|||
round Fraction
You can call the Switch function. This accepts a list of expressions and
returns a value associated with the first expression which is True, so the ControlSource for a text box on a form would be: =Switch([YourField] 0 And [YourField] 0.2,0,[YourField] = 0.2 And [YourField] 0.4,0.25,[YourField] = 0.4 And [YourField] = 0.6,0.5) where YourField is the name of a field or control containing the original number. For values less than zero or greater than 0.6 Null would be returned. Ken Sheridan Stafford, England "ghost" wrote: Greeting, I have the following fraction need to be rounded if they met cretin conditions: From 0.01 to 0.019 = 0 0.20 to 0.39 =0.25 0.40 to 0.60 =0.50 How to do that in form please?? |
Thread Tools | |
Display Modes | |
|
|