D
DocBrown
I have two tables related via an ID field. I have a logging form that is
based on a query on the two tables. This volunteerLog is the login/logout
data each time the volunteer works a shift. The volunteers table keeps track
of all the info on a volunteer including total hours of volunteering. The
volunteerId is displayed on the logging form as a multi-column combo box that
displays the volunteer's name.
For new records of each log entry, the shift hours are added to the total
hours. This works.
I'm thinking of allowing 'oops'es and if the user changes the volunteer by
selecting a different name I subtract the shift hours from the Totalhours on
the 'old' volunteer and add the hours to the newly selected volunteer. Can I
do this and if so, how?
Here's the query:
SELECT VolunteerLog.RecordID, VolunteerLog.VolunteerID,
VolunteerLog.LogDate, VolunteerLog.TimeIn, VolunteerLog.TimeOut,
Volunteers.FirstName, Volunteers.LastName, Volunteers.SchoolName,
Volunteers.TotalHours
FROM Volunteers INNER JOIN VolunteerLog ON Volunteers.VolunteerID =
VolunteerLog.VolunteerID;
Thanks. You guys have been great help my other questions.
John
based on a query on the two tables. This volunteerLog is the login/logout
data each time the volunteer works a shift. The volunteers table keeps track
of all the info on a volunteer including total hours of volunteering. The
volunteerId is displayed on the logging form as a multi-column combo box that
displays the volunteer's name.
For new records of each log entry, the shift hours are added to the total
hours. This works.
I'm thinking of allowing 'oops'es and if the user changes the volunteer by
selecting a different name I subtract the shift hours from the Totalhours on
the 'old' volunteer and add the hours to the newly selected volunteer. Can I
do this and if so, how?
Here's the query:
SELECT VolunteerLog.RecordID, VolunteerLog.VolunteerID,
VolunteerLog.LogDate, VolunteerLog.TimeIn, VolunteerLog.TimeOut,
Volunteers.FirstName, Volunteers.LastName, Volunteers.SchoolName,
Volunteers.TotalHours
FROM Volunteers INNER JOIN VolunteerLog ON Volunteers.VolunteerID =
VolunteerLog.VolunteerID;
Thanks. You guys have been great help my other questions.
John