This probably exists elswhere on the forum but cant find itso any help will be great.
Want to select a list of players from the players table who arent in a selected team for a selected competition. For example there are x number of females in the players table, and as each is entered in a team, I want them to disappear from the select query on a per competition basis. Query is as follows:
SELECT Players.Name, Players.Sex
FROM Teams, Players
WHERE (((Players.Sex)="F") AND ((Teams.Compnum)=[Forms]![Ladies Teams]![txtCompnum]) AND ((Exists (SELECT Teams.Skip, Teams.Lead, Teams.Second, Teams.Third, Teams.Compnum From Teams where players.name=teams.skip or players.name=teams.second or players.name=teams.third or players.name=teams.lead))=False));
Works ok apart from the compnum. As soon as a person enters ANY comp the query drops them irrespective of which competition they have entered.
Any help would be gratefully recieved!
Want to select a list of players from the players table who arent in a selected team for a selected competition. For example there are x number of females in the players table, and as each is entered in a team, I want them to disappear from the select query on a per competition basis. Query is as follows:
SELECT Players.Name, Players.Sex
FROM Teams, Players
WHERE (((Players.Sex)="F") AND ((Teams.Compnum)=[Forms]![Ladies Teams]![txtCompnum]) AND ((Exists (SELECT Teams.Skip, Teams.Lead, Teams.Second, Teams.Third, Teams.Compnum From Teams where players.name=teams.skip or players.name=teams.second or players.name=teams.third or players.name=teams.lead))=False));
Works ok apart from the compnum. As soon as a person enters ANY comp the query drops them irrespective of which competition they have entered.
Any help would be gratefully recieved!
Last edited: