A
AccessIM
Hi -
Currently I have a form and a subform. On the form, I have a command button
that opens a report in print preview based on criteria set from information
on the subform.
My question is: Can I use the same command button to open a different
report based on a field in the subform?
For example, if the DISCIPLINE field in the selected record on the subform
says "ATTENDANCE INFORMATION FORM", I would like the
rptAttendanceInformationFormReprint to open when the button is clicked.
However, if the DISCIPLINE field in the selected record on the subform says
anything other the "ATTENDANCE INFORMATION FORM", I would like the
rptDisciplineReportReprint to open when the button is clicked.
I was thinking this could be done with an if...else statement in the
OnClick() event in VB but I am not very good at writing code and all attempts
I have made have not worked.
Any help would be appreciated! Thank you.
Currently I have a form and a subform. On the form, I have a command button
that opens a report in print preview based on criteria set from information
on the subform.
My question is: Can I use the same command button to open a different
report based on a field in the subform?
For example, if the DISCIPLINE field in the selected record on the subform
says "ATTENDANCE INFORMATION FORM", I would like the
rptAttendanceInformationFormReprint to open when the button is clicked.
However, if the DISCIPLINE field in the selected record on the subform says
anything other the "ATTENDANCE INFORMATION FORM", I would like the
rptDisciplineReportReprint to open when the button is clicked.
I was thinking this could be done with an if...else statement in the
OnClick() event in VB but I am not very good at writing code and all attempts
I have made have not worked.
Any help would be appreciated! Thank you.