Simple query

solomon

Registered User.
Local time
Today, 09:53
Joined
Oct 19, 2004
Messages
14
Hi I have a query that divides two fields and returns the result to another field. Example:

Table A: Field 1,Field 2,Field 3
Table B: Field 5,Field 6,Field 7

I have a query that joins both tables in a relations and now have both fields combined in the query to make one table. And i also created an additional field called "test" that works out Field 1/Field 5.

Problem: If Field 1 = 0 and Field 5 = 0 then "Test" returns #Error.

How do i get raid of this #error and make it show 0 since that's what the answer should be?

Any help always appreciated. :confused:
 
Try:

Test: IIf(Field5 = 0,0,Field1/Field5)
 
Thanks Pbaldy, but the formula has generated some error with the message:

"The expression you entered contain invalid Synthax. you may have entered an operand without an operator".

Can you please advise what you think might be wrong with the forlmula.

Appreciate the time. Anyone with a suggestion is more than welcome to help.

Thanks peps.
 
Just tested, and it worked fine, as expected. It would help if you posted the expression that you tried.
 

Users who are viewing this thread

Back
Top Bottom