Results 1 to 3 of 3
  1. #1
    eds is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    2

    Angry Calculated field help


    I have a small database containing club membership data. The data is mostly in 1 table. Each club member must attend 5 meetings per year. There is 1 meeting per month. The table data is represented as 12 text fields (jan thru dec). If a member attends a meeting the user places an X in the appropriate month field. I need to produce a report that contains first name, last name, and number of meetings attended. Any help would be greatly appreciated.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    You need to add up the Xs. Use an expression in a field of the query, like:

    This, if really is a text datatype
    IIf([Jan]="X",1,0) + IIF([Feb]="X",1,0) + ...

    Or

    For Yes/No datatype
    Abs([Jan]+[Feb]+[Mar]...)
    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
    eds is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    2
    Quote Originally Posted by June7 View Post
    You need to add up the Xs. Use an expression in a field of the query, like:

    This, if really is a text datatype
    IIf([Jan]="X",1,0) + IIF([Feb]="X",1,0) + ...

    Or

    For Yes/No datatype
    Abs([Jan]+[Feb]+[Mar]...)

    IIF statement worked perfectly. Thanks for your help !

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

Similar Threads

  1. Calculated Field (if/then) Help
    By agent- in forum Programming
    Replies: 10
    Last Post: 03-30-2011, 05:43 PM
  2. Calculated Field Help
    By Alex Motilal in forum Queries
    Replies: 2
    Last Post: 01-06-2011, 04:54 AM
  3. calculated field from calculated field?
    By RedGoneWILD in forum Reports
    Replies: 5
    Last Post: 08-03-2010, 02:32 PM
  4. Calculated field
    By nashr1928 in forum Forms
    Replies: 9
    Last Post: 08-01-2010, 01:59 PM
  5. Calculated field
    By nashr1928 in forum Forms
    Replies: 3
    Last Post: 07-22-2010, 05:10 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