C
Craig
Hello,
I am designing a database to hold employee training information in Microsoft
Access 2003.
I have a form (frmTraining) with a subform (frmTI). The main form shows the
employee's information: Name, number, shift, etc. The subform shows all of
the training courses that the employee has participated in, along with the
date he/she completed the course and a field for comments.
I want the user to be able to click a button or a checkbox, which will
activate some Visual Basic code that changes the source of the subform --- so
that the user can either view ALL of the employee's training records, or just
the most recent training record for each course.
I can figure out how to show all the records (simply set the source to
tblTrainingIncidents), and I can figure out how to show only the most recent
record in a query (qryTI, based on tblTrainingIncidents, which uses a
MaxOfDate field).
My question: Is there an elegant way to switch between the two sources? Or
do I need to come up with an alternative for the source when I want to show
only the most recent training record?
I apologize if this is not very clear --- any help is greatly appreciated!
Thanks,
Craig
I am designing a database to hold employee training information in Microsoft
Access 2003.
I have a form (frmTraining) with a subform (frmTI). The main form shows the
employee's information: Name, number, shift, etc. The subform shows all of
the training courses that the employee has participated in, along with the
date he/she completed the course and a field for comments.
I want the user to be able to click a button or a checkbox, which will
activate some Visual Basic code that changes the source of the subform --- so
that the user can either view ALL of the employee's training records, or just
the most recent training record for each course.
I can figure out how to show all the records (simply set the source to
tblTrainingIncidents), and I can figure out how to show only the most recent
record in a query (qryTI, based on tblTrainingIncidents, which uses a
MaxOfDate field).
My question: Is there an elegant way to switch between the two sources? Or
do I need to come up with an alternative for the source when I want to show
only the most recent training record?
I apologize if this is not very clear --- any help is greatly appreciated!
Thanks,
Craig