Figured it out!
The null value returns from query below was the culprit.
SELECT ScheduleDate, HomeId as TeamId, "H" as HV
FROM MasterIceSchedule
UNION ALL SELECT ScheduleDate, VisitorId, "V"
FROM MasterIceSchedule;
Can't explain why, but when I modified the query to:
SELECT ScheduleDate...
Sorry. With the many different approaches I have been using to solve this problem I forgot which one I quoted. I also tried this with a query that extracts the home association TeamIds straight from MasterIceSchedule.
In both scenarios, the resultant record set it null.
Duane,
Yes, there are 39 team ID values that are the same in the home team table and visitor team table. The tables are essentially copies of each other. As mentioned near the begining there was a reason I had to make 2 tables with virtually the same info. However, I am not using either of...
Unforetunately, I need to worry about the visitor team. We have house league teams that play within our association and against other associations.
I tried not using the union query (as above) and I get similar results. Of course, this time it is only 6 records that are returned in the primary...
The preliminary queries return the expect results. The code above works and returns the 5 teams that are on the ice that day. I have 6 ice times that day. So there is a potential for up to 12 teams to be on the ice. It just happens that right now, I only have 5 scheduled in.
ScheduleDate only...
Duane,
I'm stumped. I tested out your query with some dummy data and the logic seems to work. But, when I apply it to my live database, it doesn't work.
Here is what I think is all the significant info:
Table: MasterIceSchedule (Contains all the ice time info and teams on the ice)...
Duane,
Sorry for the misunderstanding. Yes, I created the union query to get a list of all unique teams whether they were home on visitor.
I then tried to figure out how to use that query to determine which teams didn't appear on a particular night. But I keep getting a result with no teams. I...
Ok...
I have my table of unique team names as suggested by dhookom. I have made a form based on the query to "translate" the Team # to the team name and have used it as a subform to list the teams on the ice based on ScheduleDate. However, I can't seem to get the opposite (teams not on the ice)...
Can not use the ice that day" refers to what we call "blackout dates". They are mainly for tournaments, but could be for many reasons.
In hind sight, I actually have blackout as a facility, so they show up in my regular schedules, and therefore are not needed in the "not on the ice" report.
Duane,
Thanks for the tip. I have a table of unique teams. I actually have 2. One for Home and one for Visitor. Probably not the best solution, but something required me to do it. (I just can't remember what at the moment.)
The table of unique teams also has division, level, and coach contact...
Sorry. Forgot to add some useful information, and I can't seem to figure out how to edit posts in this forum.
All the pertinent data is in a single table. Which would be ScheduleDate, HomeTeam and VisitorTeam.
So, basically what I want is to list the date and every team that doesn't show up in...
Hi,
First off, let me appologies for the description of this thread/question. I'm sure it does not describ my question properly.
Here is the background to my question:
I schedule ice for a minor hockey associaition. I decided to use Access this year, instead of Excel for it's reporting...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.