Results 1 to 4 of 4
  1. #1
    Ron H. is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    2

    IIf Function in Report Footer

    I have a report where I'm trying to list out last names if a variable in one field is met.

    The IIf function statement is as follows in the "report footer" section of the report:

    =IIf([Fri1]="ST1",[Last Name],"")



    What I'm attempting to get is... If "ST1" is an entry in the [Fri1] field, then list all the last names ([Last Name] is the field of last names) showing a ST1 entry, else "" (don't list anything).

    The IIf expression doesn't error out; however, I get nothing listed.

    Any suggestions?

    Thank You

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Cannot use calculation in header/footer section to control display of records. You can apply filter criteria in the report RecordSource to retrieve only records where Fri1 <> "ST1".


    Header/Footer sections are for aggregate calculations, like:

    =Sum(IIf([Fri1]="ST1", 1, 0))
    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
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    based on my interpretation of your post I can't be sure of your structure - possibly you can achieve what you seek via the OnFormat property of the report's footer section.....right click when your cursor is on the header of the section and then select the OnFormat property; using vba (if/then statement) one can toggle a field's visibility dependent upon another field's value. though I can't tell if that will satisfy your requirement.

  4. #4
    Ron H. is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    2
    Thank you both so much.

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

Similar Threads

  1. Replies: 7
    Last Post: 10-04-2013, 11:45 AM
  2. Using "Count" function in a report footer
    By GraeagleBill in forum Reports
    Replies: 5
    Last Post: 05-11-2013, 03:42 PM
  3. Access 2007 Report footer
    By mab in forum Access
    Replies: 1
    Last Post: 05-16-2011, 09:49 AM
  4. Error in Footer Sum on Report
    By eww in forum Reports
    Replies: 2
    Last Post: 08-26-2010, 01:54 PM
  5. Problems with SUM in Report Footer
    By bonetakc in forum Forms
    Replies: 1
    Last Post: 07-30-2009, 04:53 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