Results 1 to 13 of 13
  1. #1
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591

    Building Forms for different size monitors

    We all use vintage (3 to 4 years old) laptops which serve us pretty well. They are all connected to one or two 21" monitors which improves the work environment vastly. The problem is that some users are stuck with using the smaller 15" display of the laptop which as you can imagine presents some problems when you have done all your development on the 21" monitor. Considering that there is no way to know what kind of display is being used at disparate locations, do you have any suggestions for designing for this. Is there a setting or some codes that would adjust the display to the monitor size? I would hate to design for the smallest, lowest resolution possible. Should I split it down the middle and design for a 17" or 19" monitor. It's not that the forms can't be used, but they are awkward and don't look that great. I am going to shrink down the forms a bit, but I'm wondering if there is another solution.

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,428
    would hate to design for the smallest, lowest resolution possible
    that is the usual method - it is always easier to make things bigger rather than smaller.

    Since access 2007 controls can be repositioned through the properties (see the control anchor properties) or on the ribbon in form design view, the anchoring option on the Arrange ribbon

    If you really want to get into it, there are code examples out there to determine the screen size the form is open (not sure how well it will work with multi screens). When you know that you can have more code to resize controls/fonts etc. There are also modules you can purchase to do this for you.

    Also look at the form insidewidth/insideheight properties, the section height properties and the control move function to move and resize controls.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    First off, screen size, in and of itself, has nothing to do with the problem; the problem is resolution! It just so happens that newer, bigger monitors tend to come with their default resolution set higher than the maximum possible for older machines. You can usually set your newer monitors to a lower resolution than they're set at, from the factory, and possibly find common ground among all the machines involved, here. The higher resolutions offered, especially on larger monitors, are great if you're dealing with commercial graphics programs...or playing advanced video games...but are really overkill for most business applications, such as running databases.

    There are hacks out there for adjusting the size of Forms (some for free, some for a fee) based on the resolution of the machine they're running on, but all of these come with the same caveat, as Ajax touched on; they all only perform well when the programs are developed in the lowest resolution you're likely to encounter!

    Using the lowest common denominator, in program development, is pretty much always the best policy! You can't, for interest, develop a database in Access 2010, using features just introduced in that version, and expect to run the app on a machine running Access 2003, can you?

    Here's a link to one of these hacks that has been around for a very long time and has a good reputation:

    ShrinkerStretcher

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591
    Thanks to both Ajax and Missinglinq. I've decided at the point not to go for a hack. I created some extra space for my continuous form, which had only enough room to display one record in its original format. Now it will display 3 or 4 which should be sufficient for most purposes, except for one item. My scroll bar doesn't display correctly. Two things. The down arrow does not display on the lower resolution laptop making it difficult to scroll down. The "grab bar", the thing you use to drag the scroll bar up and down tends to be hidden compounding the scroll down issue. When the same form is displayed on the high res monitor, none of this occurs. This is hard to describe, so ask away if I need to clarify.

    Thanks in advance. Going home now, I'll check back in the AM.

    Paul

  5. #5
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,428
    there are some simple things you could do if relevant. I tend not to use the access 'anchor' properties partly because I've been developing a lot longer then they've been around and I had already developed my own techniques and partly because they don't do everything I want to be able to do.

    So for example, if you have a continuous subform at the bottom of the main form, to make sure it fits (subject to there being enough room anyway) and therefore scrollbars will work, this code will resize the subform to fit when placed in the mainform resize event

    'no form header/footer
    me.subformname.height=insideheight-me.subformname.top-60 '-60 to provide a small margin at the bottom

    'subform in footer section
    'me.subformname.height=me.section(2).height-me.subformname.top-60

    'to adjust for width
    me.subformname.width=insidewidth-me.subformname.left-60

  6. #6
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591
    I tried the first two with unexpected results which I have decided not to debug. I have a simple work around if all else fails. Using the scroll wheel on the mouse allows the user to scroll through the records, but I would prefer a functioning scroll bar. Again, this only happens on the low res version. See the picture below.
    Click image for larger version. 

Name:	scroll 4.JPG 
Views:	28 
Size:	27.2 KB 
ID:	27193
    You can see the up arrow, but not the down. Also when you see the scroll bar near the last record you can use it to drag all the way to the first record, but when you try to drag it down it only lets you scroll so far then disappears at the bottom of the subform.

    Click image for larger version. 

Name:	scroll 2.JPG 
Views:	28 
Size:	27.0 KB 
ID:	27194 Click image for larger version. 

Name:	scroll 3.JPG 
Views:	28 
Size:	27.4 KB 
ID:	27195

    I don't know how many people this will affect, but I would prefer a normal functioning form for all users.

    Thanks for your patience.

    Paul

  7. #7
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,428
    don't see what the unexpected results would be but the reason your vertical scrollbar doesn't work is because the subform extends below the screen

  8. #8
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591
    Had this all typed out carefully yesterday, but must have forgot to post. I'll try again.
    The first code,
    • 'no form header/footer did nothing to help the low res laptop display, but the down arrow disappeared on the 21" high res display. Taking the code out restored it to normal.


    The second code,
    • 'subform in footer section displays the arrows, but shrinks the subform size to about 1.5", only displaying 2 records on either low res or high res, instead of the normal 5 to 10.


    I didn't use the 3rd code since width is not a problem

    The subform in question sits in the main section of the main form. There is another subform in the Main form's footer.

    Nothing I have tried has worked so far.

  9. #9
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,428
    suspect we are only seeing half the picture, suggest provide a screen shot of the entire form in design view, one in normal view from the pc and one normal view from the laptop. black out any sensitive data

  10. #10
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591
    I agree Ajax. Here are the screenshots.
    • Design View
      Click image for larger version. 

Name:	screen design.JPG 
Views:	24 
Size:	152.7 KB 
ID:	27248
    • High Res Monitor
      Click image for larger version. 

Name:	screen high res.JPG 
Views:	24 
Size:	159.9 KB 
ID:	27249
    • Low Res Monitor
      Click image for larger version. 

Name:	screen low res.JPG 
Views:	24 
Size:	111.2 KB 
ID:	27250


    The only real differences are that you can see fewer records on the low res, which is not a problem, but also there is no down arrow on the scroll bar, which is the main problem.

    Hope this clarifies a few things.

    p.s. All the maladies are fiction and have been used in development and testing.

  11. #11
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,428
    OK so to be clear it is the subform in the detail section you need to resize

    To resize it, it needs to take into account the header and footer heights, so something like

    me.subformname.height=insideheight-me.section(1).height-me.section(2).height-me.subformname.top-60

    or you can try

    me.subformname.height=me.section(0).height-me.subformname.top-60

  12. #12
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591
    Ha! Success! Your first suggestion worked. I didn't even bother with No. 2. So much trouble for such a little thing, but necessary I think. I hate to send out a flawed applications.

    I never would have solved this without your help.

    Thanks again.

    Paul

  13. #13
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,428
    So much trouble for such a little thing, but necessary I think
    only when you don't know the solution. If you are using 2007 or later there are also the anchor properties of the subform control that perhaps can be used. I don't use them because I am used to coding and was only reminded of them in another thread this morning.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 10-18-2016, 07:07 AM
  2. building forms
    By tmadrid3 in forum Database Design
    Replies: 7
    Last Post: 11-01-2013, 03:19 PM
  3. Building Forms Right
    By mjhopler in forum Access
    Replies: 1
    Last Post: 10-01-2013, 03:15 PM
  4. Help with building forms
    By DariusD in forum Access
    Replies: 23
    Last Post: 12-29-2012, 10:47 PM
  5. Replies: 4
    Last Post: 07-13-2012, 01:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums