Results 1 to 8 of 8
  1. #1
    csland is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2011
    Posts
    5

    Convert yes/no to text in Report

    I am working on a report to send to all of our clients. We have a query set up that list both street address and mailing address in separate columns and a yes/no column to check if mailing address is different.



    What I want the report to do is if the yes/no box is checked “yes” then to print “ In reference to:”+[PropertyAddress1] and if not checked then print nothing.

    This is what I entered and it’s not right:
    =IIF([mailing_address_different]=”yes”, “In reference to:” + [PropertyAddress1], “”)

    Any ideas?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try:
    =IIF([mailing_address_different]=True, “In reference to:” + [PropertyAddress1], “”)

  3. #3
    csland is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2011
    Posts
    5
    I copied & pasted it and it came up with invalid syntax.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What is the DataType of the field in the table?

  5. #5
    csland is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2011
    Posts
    5
    Data type in the table field for different_mailing_address is yes/no
    Data type in the table field for PropertyAddress1 is text (up to 200)

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    okay, Copy and paste this line:
    =IIf([mailing_address_different] = True, "In reference to: " & [PropertyAddress1], "")

  7. #7
    csland is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2011
    Posts
    5
    It worked!!!! Thank you so much for all your help, I have been racking my brain on this for about a day now.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad we could help.

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

Similar Threads

  1. Convert text to datetime
    By kaledev in forum Queries
    Replies: 3
    Last Post: 01-28-2011, 10:21 AM
  2. Convert rtf to plain text
    By techneophyte in forum Programming
    Replies: 0
    Last Post: 09-08-2010, 11:13 AM
  3. Convert number to fixed length text field
    By tpcervelo in forum Queries
    Replies: 1
    Last Post: 08-02-2010, 07:26 PM
  4. Convert text to numbers
    By Mclaren in forum Programming
    Replies: 2
    Last Post: 05-02-2010, 01:36 PM
  5. Convert text to numbers
    By randolphoralph in forum Access
    Replies: 1
    Last Post: 03-21-2010, 10:33 AM

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