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
|
|||
|
|||
Hiding a #Num! occurrence in a report output
I have a report that calculates a series of percentages based on the report
calculated. Sometimes, however this results in a divided by zero calculation which then appears in the report as #Num! Is there an simple way of making the result box appear empty is there is a division by zero result or having the text "N/A" appear instead? Thanks |
#2
|
|||
|
|||
Hiding a #Num! occurrence in a report output
Stephen,
You can use the NZ function in your calculation, to prevent Null values from interfering with the calculation. Or... use an IIF statement in the ControlSource of your control to determine if an element of the calculation will cause the error, or not. IFF([Y] = 0, "N/A", [X] / [Y]) -- hth Al Campagna Microsoft Access MVP http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." "Stephen Brown" wrote in message ... I have a report that calculates a series of percentages based on the report calculated. Sometimes, however this results in a divided by zero calculation which then appears in the report as #Num! Is there an simple way of making the result box appear empty is there is a division by zero result or having the text "N/A" appear instead? Thanks |
#3
|
|||
|
|||
Hiding a #Num! occurrence in a report output
I'm sure what Al meant to use was IIf() not IFF() ;-)
=IIf([Y] = 0, "N/A", [X] / [Y]) -- Duane Hookom Microsoft Access MVP "Al Campagna" wrote: Stephen, You can use the NZ function in your calculation, to prevent Null values from interfering with the calculation. Or... use an IIF statement in the ControlSource of your control to determine if an element of the calculation will cause the error, or not. IFF([Y] = 0, "N/A", [X] / [Y]) -- hth Al Campagna Microsoft Access MVP http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." "Stephen Brown" wrote in message ... I have a report that calculates a series of percentages based on the report calculated. Sometimes, however this results in a divided by zero calculation which then appears in the report as #Num! Is there an simple way of making the result box appear empty is there is a division by zero result or having the text "N/A" appear instead? Thanks . |
#4
|
|||
|
|||
Hiding a #Num! occurrence in a report output
Thanks Duane... a typo.
"IIF" only I had my intellesense... :-D Al Campagna "Duane Hookom" wrote in message ... I'm sure what Al meant to use was IIf() not IFF() ;-) =IIf([Y] = 0, "N/A", [X] / [Y]) -- Duane Hookom Microsoft Access MVP "Al Campagna" wrote: Stephen, You can use the NZ function in your calculation, to prevent Null values from interfering with the calculation. Or... use an IIF statement in the ControlSource of your control to determine if an element of the calculation will cause the error, or not. IFF([Y] = 0, "N/A", [X] / [Y]) -- hth Al Campagna Microsoft Access MVP http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." "Stephen Brown" wrote in message ... I have a report that calculates a series of percentages based on the report calculated. Sometimes, however this results in a divided by zero calculation which then appears in the report as #Num! Is there an simple way of making the result box appear empty is there is a division by zero result or having the text "N/A" appear instead? Thanks . |
#5
|
|||
|
|||
Hiding a #Num! occurrence in a report output
Many thanks - that worked fine.
Stephen "Al Campagna" wrote: Thanks Duane... a typo. "IIF" only I had my intellesense... :-D Al Campagna "Duane Hookom" wrote in message ... I'm sure what Al meant to use was IIf() not IFF() ;-) =IIf([Y] = 0, "N/A", [X] / [Y]) -- Duane Hookom Microsoft Access MVP "Al Campagna" wrote: Stephen, You can use the NZ function in your calculation, to prevent Null values from interfering with the calculation. Or... use an IIF statement in the ControlSource of your control to determine if an element of the calculation will cause the error, or not. IFF([Y] = 0, "N/A", [X] / [Y]) -- hth Al Campagna Microsoft Access MVP http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." "Stephen Brown" wrote in message ... I have a report that calculates a series of percentages based on the report calculated. Sometimes, however this results in a divided by zero calculation which then appears in the report as #Num! Is there an simple way of making the result box appear empty is there is a division by zero result or having the text "N/A" appear instead? Thanks . . |
Thread Tools | |
Display Modes | |
|
|