Results 1 to 8 of 8
  1. #1
    Zaram is offline Novice
    Windows 7 Access 2003
    Join Date
    Feb 2010
    Posts
    4

    Replacing text for a report


    In the database design, we have a fixed option group where they either choose one radio button or the other. These values are recorded in the database as either a 1 or 2 depending on which radio button is selected. When I create a report though, I need to have the status listed as Open or Closed (1 and 2 respectively) but havent figured out how to accomplish this task. Any help would be appreciated.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    If those values are in another table, you'd base the report on a query that joined that table with the "main" data table, enabling you to return the text value. If not, an IIf() would be an option:

    =IIf(FieldName = 1, "Open", "Closed")
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Zaram is offline Novice
    Windows 7 Access 2003
    Join Date
    Feb 2010
    Posts
    4
    Thanks for the response. I was placing the code into the format line when I right click that area of the report in design view. It just now is blank instead when the report is run, is that code supposed to be entered in a different area?

    I apologize for any ignorance, it has been a while since I worked in Access.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    It would be the control source of a textbox.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Zaram is offline Novice
    Windows 7 Access 2003
    Join Date
    Feb 2010
    Posts
    4
    When I go to the design view of the report it does not allow the option to place a textbox into the report so I don't understand how I could put that code into a text box in the report. Addt'l clarification please?

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Really? You don't have an MDE, do you? Can you post the db?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Zaram is offline Novice
    Windows 7 Access 2003
    Join Date
    Feb 2010
    Posts
    4
    Actually my apologies once more. I took another look at it all and was able to make a new text box just not alternate the text area that was reporting 1 or 2. I made the necessary changes and it is working well. Thanks again for the assistance and patience.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Ah good, glad we got it sorted out. Welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 16
    Last Post: 01-13-2010, 04:31 PM
  2. report text scrolls away when try to C & P
    By noniknonik in forum Access
    Replies: 0
    Last Post: 06-09-2009, 07:04 AM
  3. Replacing Null with 0
    By gilagain1 in forum Queries
    Replies: 5
    Last Post: 04-23-2009, 01:47 PM
  4. replacing dlookup fields with variables
    By msupitar in forum Access
    Replies: 0
    Last Post: 02-18-2009, 12:26 AM
  5. Replacing text in my database
    By sbrobin in forum Access
    Replies: 0
    Last Post: 02-08-2009, 02:17 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