Fix Image Control Size and Blank Space in Access Reports
Question details
The user needs to correctly size image controls in Access reports, maintain the image's aspect ratio, and completely remove any reserved blank space when an image is absent.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Designing dynamic Microsoft Access reports where records may or may not contain images, requiring automatic resizing and space collapsing.
- Observed behavior
- Images fail to fill the control appropriately, and blank space remains in the report section even when the image control dimensions are set to zero via VBA.
Ensure you are viewing your report in Print Preview mode, as certain formatting events like Detail_Format do not trigger correctly in standard Report View.
Adjust the Image Control Size Mode
Use the Size Mode property to ensure your images display correctly within the specified control boundaries without being cropped or distorted.
The Size Mode property dictates how an image behaves inside its control. Using the incorrect mode can result in cut-off images or unwanted transparent borders inside the control area.
Right-click your report in the Navigation Pane and select 'Design View'.
Click on the target image control, then press F4 to open the Property Sheet.
Locate the 'Size Mode' property. Change it to 'Zoom' to preserve the image's aspect ratio (preventing distortion), or 'Stretch' if the image must fill the exact dimensions of the control regardless of its original proportions.

Configure CanShrink and CanGrow Properties
Enable report sections and controls to automatically collapse when there is no image data, removing unnecessary white space.
Dynamically Resize Controls using VBA
Use the Detail_Format event to programmatically set the control dimensions to zero when the image is missing.
Discover WPS Office for Seamless Data Reporting and Documentation
While Microsoft Access is used for complex relational databases, WPS Office provides a lightweight, highly compatible alternative for everyday data analysis, reporting, and documentation needs through its powerful Spreadsheets and Writer applications.

Frequently Asked Questions
Why doesn't my VBA formatting code work in Report View?
The Detail_Format event is specifically designed to format pages for physical printing. It only triggers when the report is opened in Print Preview mode or when it is actively being printed, but it is ignored in standard Report View.
Why won't my Access report section shrink even after setting CanShrink to Yes?
A report section will not shrink if there are other controls (such as invisible text boxes, lines, or labels) occupying the same horizontal band as the shrinking control. You must ensure the vertical space of the shrinking control is completely clear of overlapping elements.
What units of measurement does Access VBA use for control dimensions?
Microsoft Access uses a unit called 'twips' for control dimensions in VBA. There are exactly 1440 twips in one inch. For example, if you want to set an image width to 5 inches via VBA, you must set the width property to 7200.
Should I export my Access reports to RTF or PDF for better formatting?
If you need an uneditable, exact visual representation of your report, exporting to PDF is best. However, if you need to manually clean up residual blank spaces or edit the layout post-export, exporting to RTF (Rich Text Format) makes it easier to edit in a word processor.




