[mso] Re: Access 2003: How To Trap Blank Spaces In A Text Field?

The If function in Access is IIF, not IFF.
   
  You can use this expression in a report which pulls directly from the table. 
Assuming your report has boxes in the detail area representing the table's 
fields, and that one of these is 2nd_Phone:
   
  Right-click on the 2nd_Phone box and select Properties. On the Other tab, 
rename the field to Show2nd (necessary to avoid a circular reference). On the 
Data tab, replace the field name in the Control Source propetry with the 
formula:
   
  =IIf(Len(Trim([2nd_Phone]))>0,[2nd_Phone],Null)
   
  The formula must start with an = sign. Press Enter, then close the Properties 
dialog. View the report.
   
  Hope this helps,
   
  Hutch
Ray Shapp <ras45@xxxxxxxxxxxxx> wrote:
  Hello Hutch,

Thanks for your reply.

Here's the expression I'm using to try your idea:

Show2nd: iff(len(trim([2nd_Phone]))>0,[2nd_Phone],Null)

It generates an error saying I may have used an operator without an operand. 
Also, an exclamation mark warning next to Show2nd in the detail section of the 
report says "No Such Field in the Field List".

You advised using a similar expression in "the query which provides the data 
for the report". I'm not using a query for this report. I'm taking data 
directly from our main table. Is that my problem?

Do you need more info to tell what I'm doing wrong?

BTW, I'm still unable to see the Help system for Access on my local PC. Every 
time I press F1 or type a question for help, an article from Microsoft comes 
up.

Ray Shapp


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the dropdown 
menu at the top. This will allow you to unsubscribe your email address or 
change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to share files with the group, you must join our Yahoo sister group. 
This group will not allow for posting of emails, but will allow you to join and 
share problem files, templates, etc.: 
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE 
SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary code in your email 
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************


       
---------------------------------
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the dropdown 
menu at the top.  This will allow you to unsubscribe your email address or 
change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to share files with the group, you must join our Yahoo sister group. 
 This group will not allow for posting of emails, but will allow you to join 
and share problem files, templates, etc.:  
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE 
SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary code in your email 
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************

Other related posts: