StevePalmer1
Technical User
Hello,
I have a very simple database for recording attendence to classes
Table 'Player'
PlayerID AutoNumber
FirstName Text
LastName Text
...
Table 'Class'
Class AutoNumber
Date Date/Time
Table 'Player Attendence'
PlayerAttendence AutoNumber
Attended Yes/No
Class Number
Player Number
'Player Attendence'.Class and 'Player Attendence'.Player are foreign keys to the Class and Player tables.
I have the following query:
SELECT Player.FirstName, Player.LastName, [Player Attendence].Attended, Player.[Class Type], [Player Attendence].Class
FROM Player LEFT JOIN [Player Attendence] ON Player.PlayerID = [Player Attendence].Player
WHERE (((Player.[Class Type])=1));
What I would like is to default [Player Attendence].Class to the max value in the table Class i.e
SELECT Max(Class.Class)
FROM Class;
In this way to record attendance to a class the user would add a new entry to the 'Class' table and then fire the modified query. Is this possible? As you can see I am new to access to please excuse if I am missing the obvious.
Thanks
I have a very simple database for recording attendence to classes
Table 'Player'
PlayerID AutoNumber
FirstName Text
LastName Text
...
Table 'Class'
Class AutoNumber
Date Date/Time
Table 'Player Attendence'
PlayerAttendence AutoNumber
Attended Yes/No
Class Number
Player Number
'Player Attendence'.Class and 'Player Attendence'.Player are foreign keys to the Class and Player tables.
I have the following query:
SELECT Player.FirstName, Player.LastName, [Player Attendence].Attended, Player.[Class Type], [Player Attendence].Class
FROM Player LEFT JOIN [Player Attendence] ON Player.PlayerID = [Player Attendence].Player
WHERE (((Player.[Class Type])=1));
What I would like is to default [Player Attendence].Class to the max value in the table Class i.e
SELECT Max(Class.Class)
FROM Class;
In this way to record attendance to a class the user would add a new entry to the 'Class' table and then fire the modified query. Is this possible? As you can see I am new to access to please excuse if I am missing the obvious.
Thanks