Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How can I get a form to resize based on the available and required space in the window?

Posted on 2011-05-09
Medium Priority
Last Modified: 2012-06-21
How can we get a form to resize based on the available and required space in the window?  
For example, when I first open this screen, the columns go right across the page.  However, I can see that the Call Type column is wider than it needs to be.  So I resize that column by double-clicking on the vertical boundary between the ‘Call Type’ and ‘Time Band Class’ column
 Chart1This brings the columns in but now I am left with some dead space on the right of the datasheet (as you can see in the next screenshot).  Why can’t the size of the datasheet auto-adjust and pull the right-hand border in so that there is no dead space on the form?
 Chart2Similarly, if I go to a larger screen size the area in which the data sheet sits expands, but the data sheet remains exactly the same size so we are left with this area on the screen which could be used by the data sheet but isn’t and will mean that users need to use the horizontal scroll bar when they shouldn’t need to do so.  
Question by:Voodoo_chile
  • 3
  • 2
LVL 75
ID: 35726070
This may help you:


"AutoColumnWidth is a Database containing functions to enable auto sizing of Columns in Form Datasheet view by clicking on the Column Header. Also contains a class to NOT allow the user to change the ColumnWidths at runtime. "

Not sure if it works in an ADP ...
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35731040
You seem to be confusing various terms:
-space in the window
-available and required space in the window?
Please clearly Define what you are calling "requited" space

You also have to consider the resolution the user is running at, so you need to be very specific here...

< Why can’t the size of the datasheet auto-adjust and pull the right-hand border in so that there is no dead space on the form?>
Because this is not normally an issue...

What you are asking requires that the size of the subform be adjusted as well..

Can you take a moment to step back and explain the *Why* behind your multitude of questions here?

Author Comment

ID: 35828182
This is the explaination for this question:
Because I need to deploy the MS Access appplication to my clients and they have different screen sizes and screen resolutions. Currently, all my form desgin is based on the lowest screen resolution 1024*768, but my client may have high resoulution screens or small laptop screens. Therefore when the form is fitting the screen properly in my development environment, it cannot use all the available space on other monitors. The aim I would like to achieve is to dynamically adjust my subform size and controls position based the screen resoultions.  Is there any way and code sample to achieve this? Thanks.
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 75

Accepted Solution

DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1500 total points
ID: 35828203
"adjust my subform size and controls position based the screen resoultions."

I have used this to do that:


LVL 75
ID: 35871418
Has this question been resolved?  Can we close the question ?


Author Closing Comment

ID: 35871524
That is website providing some good sample codes; and I need to integrate them into my application to do furthen testing.

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question