newdistrict
New member
- Local time
- Today, 05:59
- Joined
- Jun 26, 2017
- Messages
- 4
ETA: working with MS Access 2010
I have a form, frmProjects, that has 30 command buttons. Each command button has a unique caption (e.g. Team 1 Active Projects, Team 1 Upcoming Projects, Team 2 Active Projects, Team 2 Upcoming projects, etc.).
Right now, I have it set up so that each command button on the form opens a unique report, e.g. rptTeam1_Active, rptTeam1_Upcoming, rptTeam2_active, etc. The reports are all similarly designed, but have different filters for each respective team and project status, so only that team's active and/or upcoming projects is displayed. The only difference in design is a Label (lets call it Label2 for reference) at the top of the report that has the Team's name and assignment type as the caption for the label.
This set up makes it extremely tedious to make any changes to the report design, since each time I want to make a modification, I have to apply it manually to 30 different reports, i.e. each time I want to add a new column to the report, I have to make the change 30 times so that it is reflected in each report for each team and project status.
Is there anyway I can program the command buttons to open the same report object, lets call it rptProjects, but to apply different filters for each command button? For example, if I click on CommandTeam1Active on frmProjects, can I program the event procedure so that it will open rptProjects with the Data filter for the report set to (([tblProjects].[Status]="Active" And [tblProjects]![Team] = "Team1"))? This way, I only modify one report object (rptProjects) each time I want to make a change to the report's design.
Additionally, is there a way to have Label2 on rptProjects populate with the caption of the Command Button the user clicks on in frmProjects?
Thank you in advance for your help.
I have a form, frmProjects, that has 30 command buttons. Each command button has a unique caption (e.g. Team 1 Active Projects, Team 1 Upcoming Projects, Team 2 Active Projects, Team 2 Upcoming projects, etc.).
Right now, I have it set up so that each command button on the form opens a unique report, e.g. rptTeam1_Active, rptTeam1_Upcoming, rptTeam2_active, etc. The reports are all similarly designed, but have different filters for each respective team and project status, so only that team's active and/or upcoming projects is displayed. The only difference in design is a Label (lets call it Label2 for reference) at the top of the report that has the Team's name and assignment type as the caption for the label.
This set up makes it extremely tedious to make any changes to the report design, since each time I want to make a modification, I have to apply it manually to 30 different reports, i.e. each time I want to add a new column to the report, I have to make the change 30 times so that it is reflected in each report for each team and project status.
Is there anyway I can program the command buttons to open the same report object, lets call it rptProjects, but to apply different filters for each command button? For example, if I click on CommandTeam1Active on frmProjects, can I program the event procedure so that it will open rptProjects with the Data filter for the report set to (([tblProjects].[Status]="Active" And [tblProjects]![Team] = "Team1"))? This way, I only modify one report object (rptProjects) each time I want to make a change to the report's design.
Additionally, is there a way to have Label2 on rptProjects populate with the caption of the Command Button the user clicks on in frmProjects?
Thank you in advance for your help.
Last edited: