I am creating an Access 2010 database for my department’s course catalog. There is a report that lists all the courses and their meeting times, rooms, and instructors. However, some courses have extra days designated for lab or recitation. These should appear on a line below the other information.
Currently, the report’s Detail section has the text boxes for each of the always-required fields. On the next line, still in the Detail section, are the text boxes for the optional fields. I want to conditionally suppress printing the optional fields.
I tried using a macro on the Detail section’s On Print method that sets the Visible property on the appropriate controls to No, but this causes every instance of the control to be hidden on all rows. Additionally, even though all the controls on a line are hidden, blank lines still show up in the report. I also started looking at the control’s On_Print VBA method, but when I try to conditionally cancel the method, it ends up not printing anything.
What is the best way to design the report to do this, and what other resources can I look at?