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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Nested If



 
 
Thread Tools Display Modes
  #1  
Old January 12th, 2010, 11:25 PM posted to microsoft.public.access.gettingstarted
Suzanne
external usenet poster
 
Posts: 250
Default Nested If

Hi, I'm having trouble with making a field in my select query, this is what i
have so far, you can get the gist of what i want to do from it:

Census: IIf([Census Req]”” And [Census Rec’d]””,”Sent “ & [Census Req] &
“ Rec’d “ & [Census Rec’d], IIf([Census Req] ”” And [Census Rec’d]
=””,”Sent “ & [Census Req], “Rec’d “ & [Census Rec’d]))

If anyone can help i would really appreciate it.

Thanks
  #2  
Old January 13th, 2010, 12:12 AM posted to microsoft.public.access.gettingstarted
KenSheridan via AccessMonster.com
external usenet poster
 
Posts: 1,610
Default Nested If

Might it be that the fields are Null rather than containing zero-length
strings? To cover both possibilities:

Census: IIf([Census Req] & "" "" And [Census Rec’d] & "" "","Sent " &
[Census Req] & " Rec’d " & [Census Rec’d], IIf([Census Req] & "" "" And
[Census Rec’d] & "" = "","Sent " & [Census Req], "Rec’d " & [Census Rec’d]))

Ken Sheridan
Stafford, England

Suzanne wrote:
Hi, I'm having trouble with making a field in my select query, this is what i
have so far, you can get the gist of what i want to do from it:

Census: IIf([Census Req]"" And [Census Rec’d]"","Sent " & [Census Req] &
" Rec’d " & [Census Rec’d], IIf([Census Req] "" And [Census Rec’d]
="","Sent " & [Census Req], "Rec’d " & [Census Rec’d]))

If anyone can help i would really appreciate it.

Thanks


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/201001/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 10:07 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.