A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IsNull



 
 
Thread Tools Display Modes
  #1  
Old February 12th, 2007, 08:18 PM posted to microsoft.public.access.queries
Mike Will via AccessMonster.com
external usenet poster
 
Posts: 3
Default IsNull

I've tried and tried to rewrite the following section of my sql statement to
no avail using IsNull in place of Nz. I need to use this query in a web
application and must convert the Nz to IsNull.

IIf([OTHours]10,Sum([OTHours]+Nz(([OTType]/1000000)+([OTRefusal]/10000000),0)


I've tried

IIf([OTHours]10,Sum([OTHours]+IsNull(([OTType]/1000000)+([OTRefusal]
/10000000),0,([OTType]/1000000)+([OTRefusal]/10000000))


but receive the wrong number of argument error.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200702/1

  #2  
Old February 12th, 2007, 09:04 PM posted to microsoft.public.access.queries
giorgio rancati
external usenet poster
 
Posts: 58
Default IsNull

Hi Mike,
try it
----
SUM(IIF([OTHours]10,[OTHours]+IIF(isnull([OTType]+[OTRefusal])=True,0,([OTType]/1000000+[OTRefusal]/10000000)),0))
----

bye
--
Giorgio Rancati
[Office Access MVP]

"Mike Will via AccessMonster.com" u15958@uwe ha scritto nel messaggio
news:6db5d1d68490b@uwe...
I've tried and tried to rewrite the following section of my sql statement
to
no avail using IsNull in place of Nz. I need to use this query in a web
application and must convert the Nz to IsNull.

IIf([OTHours]10,Sum([OTHours]+Nz(([OTType]/1000000)+([OTRefusal]/10000000),0)


I've tried

IIf([OTHours]10,Sum([OTHours]+IsNull(([OTType]/1000000)+([OTRefusal]
/10000000),0,([OTType]/1000000)+([OTRefusal]/10000000))


but receive the wrong number of argument error.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200702/1



  #3  
Old February 12th, 2007, 09:27 PM posted to microsoft.public.access.queries
Mike Will via AccessMonster.com
external usenet poster
 
Posts: 3
Default IsNull

Kudos! That worked out great. Thank you.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200702/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:21 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.