I have field BALL in tblPLAY for which I want to input data based on a lookup list.
The structure of tblPLAY looks like this
PLAYID...GAMEID...BALL...
The field GAMEID is the primary key in a second table called tblGAMES which looks like this
GAMEID...TEAM1...TEAM2
For each record, I want the lookup list for BALL to include only TEAM1 and TEAM2 based on the value of field GAMEID in the same record of tblPLAY
The following works if I set in the SQL statement that GAMEID=3
SELECT tblGames.TEAM1
FROM tblGames
WHERE (((tblGames.GameID)=3))
UNION
SELECT tblGames.TEAM2
FROM tblGames
WHERE (((tblGames.GameID)=3));
now I would like this query for the lookup field to work for all games (not just game #3) ...
I try to use the statement ... WHERE (((tblGames.GameID)=(tblPlay.GameID))) and that does not work
Any advice?
The structure of tblPLAY looks like this
PLAYID...GAMEID...BALL...
The field GAMEID is the primary key in a second table called tblGAMES which looks like this
GAMEID...TEAM1...TEAM2
For each record, I want the lookup list for BALL to include only TEAM1 and TEAM2 based on the value of field GAMEID in the same record of tblPLAY
The following works if I set in the SQL statement that GAMEID=3
SELECT tblGames.TEAM1
FROM tblGames
WHERE (((tblGames.GameID)=3))
UNION
SELECT tblGames.TEAM2
FROM tblGames
WHERE (((tblGames.GameID)=3));
now I would like this query for the lookup field to work for all games (not just game #3) ...
I try to use the statement ... WHERE (((tblGames.GameID)=(tblPlay.GameID))) and that does not work
Any advice?