One way of doing it is using a UNION query to add EMPTY rows to your report
e.g. your report should have 30 rows but you only have 25 so add 5 empty rows at the bottom
Or similar idea but add rows where one field is assigned a specific value e.g. #
Then use conditional formatting to set those values the same colour as the background (white?)
Or add another field with populated rows then hide that field on your report
HTH
Would any of these populate only the amount of rows to fill up the page?
So did the sample db work for you? It does for me. Should be simple to adapt to your data. I imported the report and code into my db. Changed the RecordSource and textbox ControlSource. Changed the Group header. Ran the report. Get pages filled with blank lines below records. Exactly how does this not accommodate your requirement?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Yes all of those methods would work & so would the methods in the links given by June in post 5 which I hadn't looked at till now
I've also just seen that June successfully tried the link I uploaded (but didn't try).
So you have lots of choice - but YOU need to tell the report how many blank rows to display depending on the amount of space you have
Yes. It worked for me. I didn't see the blank lines until now. Going to give it a shot.
An alternative to using line controls is to set the ForeColor property of each textbox instead of Visibility. So in the code:
R.[ProductName].Visibility = False
would be changed to:
R.[ProductName].ForeColor = vbWhite
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Having a hard time with the Header. Since I don't have a CategoryID, I'm tring to change it to what is in my database, ScheduleID. Also, it looks like the only thing that is repeated, is the line. I need boxes, like the text boxes so that it looks consistent. If I have boxes and then just lines, it will not work. Yes, they have to be boxes. I didn't make the rules on it.
You can use more vertical line controls to create the effect of boxes. The sample has 2 vertical line controls (named Line4 and Line5) and one horizontal (named LineControl) - add as many as you need.
However, I provide alternative in post 22.
Last edited by June7; 03-10-2018 at 01:13 PM.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I appreciate being patient with me. I think that I can use the sample to help me out. I didn't think about making boxes out of the lines. I will go that route. However, I'm having a problem with the format of the report. I'm not really familiar with reports. The sample has CategoryID Header. It had to come from the table. I need to substitute it for mine, which is ScheduleID. I don't know how to do that.
Here is a tutorial article about building reports using the Grouping & Sorting designer https://support.office.com/en-us/art..._add_or_modify
In brief: report in design view > right click on the group header > Sorting & Grouping. This opens the S&G pane at bottom of report. Click on the GroupOn dropdown that probably says 'expression' and select ScheduleID. This assumes you have already changed the report RecordSource.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.