Results 1 to 3 of 3
  1. #1
    caniread is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    86

    Report to change field value in report if it equals this?

    I have a report that lists scrap reasons. How would I change the reason listed in the report without changing the query? I just need the report to change the value in the report, example when "X" change value to "Y" otherwise stay the same value as in the field name "WASTE". Anyone one know how to write this in the control expression or VBA?



    Thank you for the help,

    Isaac

  2. #2
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,793
    You'd use an IIF expression in a calculated (not bound) control that references the control(s) providing the primary and alternate data. I can't really even guess what that expression might look like based on your limited description of the situation except to say that x and y would be the control names.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    caniread is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    86
    Here is what I came up with using your comments. When true it isn't putting in "SURFACE DEFECTS", instead it says 0. Is there something I am missing?

    =IIf([WASTE_REASON]="CHOPPING",[WASTE_REASON]="SURFACE DEFECTS",[WASTE_REASON])

    OK, I figured it out. Thank you for pointing me in the right direction.

    =IIf([WASTE_REASON]="CHOPPING","SURFACE DEFECTS",[WASTE_REASON])

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

Similar Threads

  1. Replies: 3
    Last Post: 03-09-2015, 12:14 AM
  2. Change field location before printing a report
    By stan@fangandthegang.com in forum Reports
    Replies: 2
    Last Post: 07-05-2014, 12:47 AM
  3. Change field criteria in a report, or query
    By mdnikki in forum Reports
    Replies: 3
    Last Post: 10-05-2012, 12:43 PM
  4. Replies: 4
    Last Post: 04-12-2012, 06:05 PM
  5. Replies: 30
    Last Post: 03-01-2011, 10:05 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