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 » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IsNull



 
 
Thread Tools Display Modes
  #1  
Old December 2nd, 2009, 07:11 PM posted to microsoft.public.access.reports
srctr
external usenet poster
 
Posts: 56
Default IsNull

I have a test box in a report. I want the item to appear as follows
Dear Husband and Wife,

Here is the catch - I want to use the the Husband's Alias Name if he has
one, if not his FirstName. And if there is a spouse I want it to say "and
SpouseName", if there is no spouse it can't have the word "and"

This is what I have:
="Dear " & (IIf(IsNull([Alias]),StrConv([FirstName],3),StrConv([Alias],3)))
& " and " & StrCon([SpouseName],3) & ","

It works great if there are two names. It isn't great if I don't have a
spouse then it shows as
Dear Tom and ,

How do I do the IIf(IsNull) around the & "and" &StrConv([SpouseName],3) & ","


 




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 08:12 AM.


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