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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Text box with iif and is null statements
I need to have a text box that combines a couple of fields and text. My
problem is that if the field is blank I need it not to include some of the text. The text box is Dear Alias or FirstName and SpouseName, What I have is ="Dear " & (IIf(IsNull([Alias]),StrConv([FirstName],3),StrConv([Alias],3))) & (IIf(IsNull([SpouseName]),StrConv([SpouseName],3))) & "," Problem is that if there is a spousename it isn't showing. If I add in the "and" I still don't get the spouse name but I get the and. I have tried so many combinations, my head is spinning Help!! |
#2
|
|||
|
|||
Text box with iif and is null statements
srctr,
Your statement says, if there's nothing in SpouseName, show me that... IIf(IsNull([SpouseName]),StrConv([SpouseName],3)) You need to say... IIf(Not IsNull([SpouseName]),StrConv([SpouseName],3)) OR forget the IsNull altogether, actually the whole IIf statement as there is no IIf not this then that... StrConv([SpouseName],3) OR ust in case SpouseName is Null ="Dear " & IIf(IsNull([Alias]),StrConv([FirstName],3),StrConv([Alias],3)) & Trim(StrConv([SpouseName],3)) & "," -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "srctr" wrote in message ... I need to have a text box that combines a couple of fields and text. My problem is that if the field is blank I need it not to include some of the text. The text box is Dear Alias or FirstName and SpouseName, What I have is ="Dear " & (IIf(IsNull([Alias]),StrConv([FirstName],3),StrConv([Alias],3))) & (IIf(IsNull([SpouseName]),StrConv([SpouseName],3))) & "," Problem is that if there is a spousename it isn't showing. If I add in the "and" I still don't get the spouse name but I get the and. I have tried so many combinations, my head is spinning Help!! |
#3
|
|||
|
|||
Text box with iif and is null statements
Just realized I forgot the " and "... After the first ampersand place...
" and " & -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "srctr" wrote in message ... I need to have a text box that combines a couple of fields and text. My problem is that if the field is blank I need it not to include some of the text. The text box is Dear Alias or FirstName and SpouseName, What I have is ="Dear " & (IIf(IsNull([Alias]),StrConv([FirstName],3),StrConv([Alias],3))) & (IIf(IsNull([SpouseName]),StrConv([SpouseName],3))) & "," Problem is that if there is a spousename it isn't showing. If I add in the "and" I still don't get the spouse name but I get the and. I have tried so many combinations, my head is spinning Help!! |
Thread Tools | |
Display Modes | |
|
|