Results 1 to 4 of 4
  1. #1
    hfreedman1957 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2017
    Posts
    35

    Set report field to greater of two values


    Hi,
    In the Expression Builder of Control Source of a report text field, I want to set the field value to the lesser of a calculated amount and field value. How would I set that up as I don't see a VBA "Min" function that is applicable. Thanks.

  2. #2
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    = IIF([FIeld1]<[FIeld2], [Field1], [FIeld2])

  3. #3
    hfreedman1957 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2017
    Posts
    35

    It Works!!!!

    Quote Originally Posted by Bulzie View Post
    = IIF([FIeld1]<[FIeld2], [Field1], [FIeld2])

    I'm embarrassed I didn't think of an IIF statement. It works of course. Thanks so much for the fast response. You're the BEST!

  4. #4
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    Glad to help!!

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

Similar Threads

  1. Replies: 1
    Last Post: 01-05-2017, 05:14 PM
  2. Replies: 1
    Last Post: 08-29-2016, 08:16 AM
  3. Replies: 3
    Last Post: 07-24-2016, 12:28 PM
  4. Replies: 11
    Last Post: 06-11-2014, 04:50 PM
  5. Report to .pdf with field values in filename
    By davem05 in forum Reports
    Replies: 7
    Last Post: 08-14-2013, 02:51 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