Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2008

    Unanswered: Counting Text Field in Query

    I have a sports dB where my query looks at the scores and gives me a "win" or "loss" in a results field. I would like to add 2 columns where one would keep a running total of wins and the next a running total of losses so that you see a running W-L record. I also have multiple seasons so Im wondering if it will be possible to keep these running totals by season?

    Hope that made sence.

  2. #2
    Join Date
    Dec 2004
    Madison, WI
    Use an 2 expressions in your query: WinCount: iif([WinLossField]=True,1,0) and LossCount: iif([WinLossField]=False,1,0). Then use another query to sum the WinCount and LossCount values in this query. To do it by season, add in the SeasonField to "group by"
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts