Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 3rd, 2003, 11:27 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to count a record when it is not there

I keep the stats for my high school hockey team that I coach, and I enter the score sheet data into my database and then print reports. Everything worked fine execpt that I noticed our Won/Loss record was incorrect. When I looked into it I found that it was because in the games where one team did not score that game did not get counted.

I have the header table:
     Home (team number/ID)
     Visitor (team number/ID)

and the detail table:
     Team (team number/ID)
     Scorer (player number/ID)

Basically I was counting all of the entries in the detail tabel, per game, for both the home team and the visiting team matching up the StatID, but if they did not score there was no entry in the detail for one or both teams, then my query was wrong.

Anyone have a way of making this work or do I have to resort to putting 2 more fields in the header table to keep track of the final score fo the game? I know there is enough information in the tables to make this work, but I can't seem to understand the logic or figure out the query to make it work to give me the scores for each game based on the detial entries so that I can produce the won/loss record correctly.

Thanks for your help.
Old October 3rd, 2003, 03:49 PM
sal sal is offline
Friend of Wrox
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts

Please show your code that you are using on your query. It sounds like you arehaving a problem with a join clause.


Similar Threads
Thread Thread Starter Forum Replies Last Post
record count help jpaul VB Databases Basics 2 January 22nd, 2008 02:49 PM
count no of record sanjeev jha ADO.NET 1 November 5th, 2007 12:28 PM
Record count deb1980 ASP.NET 2.0 Basics 6 April 10th, 2007 12:42 PM
Count Record prasanta2expert Access 3 November 28th, 2006 10:42 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.