Modern Access Interfaces: Form Resizing Solutions with Greg Regan

Ever struggled with Access forms that look perfect on your development machine but break completely on users' screens?

In a recent Access Pacific user group presentation, Greg Regan shared his journey developing a robust form resizing solution for Microsoft Access applications. The presentation covered both the technical approach to implementing automatic form resizing and the various challenges encountered along the way. Greg's solution focuses particularly on handling forms with complex controls like option groups, navigation controls, and tab controls.

Whether you're an Access developer dealing with users running different screen resolutions or simply interested in making your applications more professional and adaptable, this detailed breakdown of form resizing techniques offers valuable insights and practical solutions.

Background and Motivation

The Problem

  • Forms developed on high-resolution screens often don't render properly on lower-resolution displays
  • Users may have older screens with poor resolution
  • Critical form elements can end up partially or completely off-screen
  • Close buttons and other important controls may become inaccessible

Initial Considerations

  • Check existing screen resolution settings
  • Look for unusual zoom settings (e.g., 150%)
  • Consider hardware solutions (new screens)
  • Balance development costs vs. hardware upgrade costs

Technical Approach

Core Concepts

  • Compare screen dimensions between developer and user machines
  • Calculate resize ratio based on dimension differences
  • Apply ratio to form and all controls
  • Record developer screen dimensions in code
  • Design forms to work well on developer screen first

Key Challenges

  • Aspect ratio differences between screens
  • Form height calculations across sections
  • Parent-child control relationships
  • Tab and navigation control handling
  • Font size granularity issues

Implementation Details

Option Groups

  • Record original control positions and sizes
  • Temporarily reduce child control sizes to zero
  • Resize option frame
  • Restore child controls with new dimensions
  • Process parent controls after children
  • Resize font size before adjusting dimensions
  • Handle button captions carefully
  • Process child elements before parent
  • Account for horizontal vs. vertical layouts

Font Handling

  • Limited granularity in font sizes
  • Round down and subtract one point for safety
  • Prevent oversized fonts from affecting control sizing

Limitations and Considerations

Current Constraints

  • Only handles downsizing to lower resolutions
  • Code runs only at form open
  • Doesn't handle monitor switching
  • Not implemented as a class

Development Considerations

  • Code doesn't save resized dimensions
  • Works in ACCDE format
  • Careful with design-time form saves after testing
  • Assumes popup forms rather than tabbed interface

Future Developments

Potential Improvements

  • Class-based implementation
  • Monitor switching support
  • Upscaling support
  • Integration with Access's native form sizing

Microsoft's Plans

  • Possible improvements to form sizing limits
  • Enhanced zooming capabilities
  • Better control growth handling
  • Vertical and horizontal spacing improvements

Resources and References

Available Solutions

  • Colin Riddington's form resizing code
  • Blog posts with additional approaches
  • Demo application available through Access Pacific
  • Source code to be shared with user group members

Conclusion

The presentation generated significant discussion and highlighted both the complexity of the problem and the community's interest in robust solutions. While Greg's implementation offers a solid foundation for handling form resizing, the discussion also revealed opportunities for further improvement and alternative approaches.

Recording

The full recording is available on YouTube:

Acknowledgements
  • Base cover image generated by FLUX-schnell
  • Initial draft generated by Claude-3.5-Sonnet