Results 1 to 5 of 5
  1. #1
    Tomfernandez1 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    74

    Double Counting the Same Saturday in a Month...

    Seasons Greetings:



    I have a report with a text box containing this expression: ="Total Saturday Trips =" & Sum(IIf([Rday]="sat",[TOTAL_PASSENGERS],0))

    The problem is the expression gives me the sum of each record that contains a saturday date; If 3 records have the same Saturday date, the text box would report 3 Saturdays. I really need it to report one Saturday per date; That is, if I have 3 three records that have 12/18/13, I need the text box to show 1 Saturday only.

    Sorry if this is long-winded.. Any help or direction is much appreciated!

    -Tommy

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What section is that expression calculated in? Maybe hide that textbox then in another:

    =IIf([other textbox]>0,1,0)

    Or

    Build an aggregate (GROUP BY) Totals query that groups by date and has the same filter criteria as the main report

    Options for using that query:

    1. source for a DCount expression in textbox

    2. subreport for the summary data
    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
    Tomfernandez1 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    74
    I will give it a try, June7.

    Thanks for the response and have a Merry Christmas!

    -Tommy

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Ooops, I was editing while you posted. Review again.

    Happy Holidays!
    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.

  5. #5
    Tomfernandez1 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    74
    June7,

    All is working fine now!

    Thanks again for the assistance!!

    -Tommy

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

Similar Threads

  1. Replies: 5
    Last Post: 09-13-2013, 02:22 PM
  2. Select Query is double counting data
    By becka11 in forum Queries
    Replies: 10
    Last Post: 04-10-2013, 03:45 PM
  3. Find the Nearest Previous Saturday
    By RachelBedi in forum Access
    Replies: 1
    Last Post: 09-21-2012, 12:51 PM
  4. Count Sunday & Saturday between two days.
    By kashif.special2005 in forum Queries
    Replies: 2
    Last Post: 02-23-2012, 06:19 PM
  5. Replies: 4
    Last Post: 04-09-2011, 10:39 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