Phucon-
That's the way I would do it.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: saigonf7q5 <saigonf7q5@yahoo.com>
Reply-To: <MS_Access_Professionals@yahoogroups.com>
Date: Monday, November 26, 2012 3:23 PM
To: <MS_Access_Professionals@yahoogroups.com>
Subject: [MS_AccessPros] Divide by zero
Good morning
One of the calculated field of my query is like this: (field1 + field2) /
field3. Sometimes the value of all these fields (or only field3) were
enterd value of Zeros, when this happens, the query output will display
"#Error".
I get rid of that error by using the IIf(field3 = 0,0,( (field1 + field2)
/ field3). I am wondering if this is an appropriate solution or there are
better ways to do it.
Phucon
------------------------------------
Yahoo! Groups Links
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar