Results 1 to 3 of 3
  1. #1
    mjsearcy is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Mar 2015
    Posts
    2

    Smile Yes/No Field - convert Yes to Text On Report

    Hi all, thank you in advance for your help. I have a Yes/No Field titled "andfamily". What I am trying to do is, when the "Yes" field is clicked, that ", and family" will be added to the "Last Name" field on the report/labels. I have written code in the query that works, but I can not get it to work on the report. The query code is Expr1: IIf([andfamily]=True,", and Family ",""). The labels code without the ", and family" added is =([Salutation]+" ") & ([NameonEnvelope]+" ") & [Last Name]. The code on the label, which does not work is, =([Salutation]+" ") & ([NameonEnvelope]+"") & ([Last Name]+" ") & [IIf([andfamily]=True,",and Family " & [Last Name],"")]


    Could someone please tell me what I am doing wrong. At this point, I am lost. Thank you so very much.

    Maurita

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    What do you mean by 'does not work' - error message, wrong results, nothing?

    Don't use [] around the IIf expression.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    mjsearcy is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Mar 2015
    Posts
    2
    Thank you from the bottom of my heart, that did the trick. I have been working on this code for hours, but never got it to work. You are fantastic! Again, thank you.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Convert memo field to multiple text fields
    By hertfordkc in forum Access
    Replies: 3
    Last Post: 11-14-2014, 06:59 AM
  2. Replies: 2
    Last Post: 12-10-2012, 02:15 PM
  3. Replies: 5
    Last Post: 06-19-2012, 10:46 AM
  4. Convert yes/no to text in Report
    By csland in forum Reports
    Replies: 7
    Last Post: 08-19-2011, 11:18 AM
  5. Convert number to fixed length text field
    By tpcervelo in forum Queries
    Replies: 1
    Last Post: 08-02-2010, 07:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums