hw to avoid #error

hotmalepiyush

Registered User.
Local time
Today, 09:00
Joined
Jun 3, 2008
Messages
60
Code:
SELECT FO.SYMBOL, FO.today, FO.yest, (today-yest)/yest*100) AS perc
Code:
[COLOR=black][FONT=Verdana]FROM FO[/FONT][/COLOR]
[COLOR=black][FONT=Verdana]WHERE (((FO.today) Not In (0)) AND ((FO.yest) Not In (0)));[/FONT][/COLOR]

sometimes when the value of FOValInLakh.[6/18/2008] is 0 i get #error. I am not able to sort(MAIN REQUIRMENT). if i use not in (0) criteria... i loose out some of the records.. is there any other solution..

thanx for ur time
piyush
 
Generally:

IIf(YourValue = 0, 0, YourCalculation)
 
In design view:

perc: IIf(YourValue = 0, 0, YourCalculation)

In SQL view

IIf(YourValue = 0, 0, YourCalculation) As perc
 

Users who are viewing this thread

Back
Top Bottom