Go Back   Access World Forums > Microsoft Access Reference > Sample Databases

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 03-02-2019, 09:34 AM   #1
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 8,582
Thanks: 102
Thanked 2,255 Times in 2,082 Posts
isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all
ResizeForm Me - An Automatic Form Resizing Tutorial

See attached for a detailed article in PDF format about automatic form resizing based on the free open source code by Jamie Czernik.

Having used this code for over 15 years, I have written the article as it appears many people do not know how to use the feature effectively with their own applications

The first part of the article discusses the benefits of automatic form resizing when developing applications for use with different monitor sizes and resolutions.
It also briefly covers an alternative approach based on layout guides and anchoring.

The second part explains how the automatic resizing code works and provides tips for using the code most effectively in your own applications.
It also covers some potential issues you may experience and possible solutions for each of these.

The attached files are
a) The article in PDF format (ResizeForm Me PDF.zip)
b) 3 example applications referenced in the article (ResizeFormExamples.zip)
c) The original resizing code by Jamie Czernik from 2003 (afr.zip)

An extended version of the PDF is also available on my website:
ResizeForm Me - An Automatic Form Resizing Tutorial

I hope this is useful to other Access developers.
Any questions or comments, please send me a PM or email
Attached Files
File Type: zip afr.zip (143.4 KB, 35 views)
File Type: zip ResizeForm Me PDF.zip (1.90 MB, 40 views)
File Type: zip ResizeFormExamples.zip (318.2 KB, 50 views)

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
The Following 3 Users Say Thank You to isladogs For This Useful Post:
lpapad (03-11-2019), moke123 (03-02-2019), theDBguy (03-02-2019)
Old 03-02-2019, 09:40 AM   #2
theDBguy
I’m here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 1,126
Thanks: 11
Thanked 257 Times in 251 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: ResizeForm Me - An Automatic Form Resizing Tutorial

You know, I've seen many discussions about this topic but it never interest me before because I haven't had a need to use it. Hopefully, your instructions would be simple enough to follow that I could try them out. Thanks!
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 03-05-2019, 10:48 AM   #3
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 8,582
Thanks: 102
Thanked 2,255 Times in 2,082 Posts
isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all
Re: ResizeForm Me - An Automatic Form Resizing Tutorial

An issue with font sizes has been reported by CJ_London. See post #2 in this thread: Optimising Queries - Speed Tests

As a result, I've made a minor change to the Resize procedure used in this code.

If you have also experienced the same issue, please use the updated version attached

NOTE: Over the coming weeks, I will gradually update the resizing code which is included in most of my other example apps
Attached Files
File Type: zip ResizeFormExample v2.2.zip (314.3 KB, 35 views)

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
Old 03-10-2019, 12:32 PM   #4
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 8,582
Thanks: 102
Thanked 2,255 Times in 2,082 Posts
isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all
Re: ResizeForm Me - An Automatic Form Resizing Tutorial

Unlike Word & Excel, there is no built in zoom control available in Access.
For those with less than perfect eyesight this can be an issue.

I have now added an extra form to the example app to show how Access forms can be zoomed using a modified version of the resizing code. The new code allows further adjustment of the form between 75% to 125% of the default size for your screen & resolution



Use the combo or (ActiveX) slider control to adjust the scale in 5% intervals according to personal preference.
The form dimensions and all controls SHOULD be adjusted accordingly
For example, with zoom = 125%



The zoom can be reset to normal by clicking the 100% button

NOTE:
1. Increasing the zoom may cause part of the form to move ‘off screen’ as in the screenshot above. Scrollbars appear automatically when this happens
2. Currently, the slider is an ActiveX control. This will be hidden and ‘inactive’ if you have disabled ActiveX controls in Access Options Trust Center. I will replace it with a non ActiveX control in the future
3. The zoom code has also been successfully tested with popup forms with zoom level from 50% - 150%
4. This demo app is intended for use with the overlapping windows option. Using the tabbed documents option can cause problems with forms being shifted off screen to the top left

As this is a moderated area, please send me a PM or email me with any feedback on the Zoom feature or any other aspect of this code

UPDATE
OOPS - reference issue for users with 64-bit Access in Windows 10
Version 2.4 in post #6 fixes this
Attached Images
File Type: jpg AFR30.jpg (78.6 KB, 187 views)
File Type: jpg AFR31.jpg (91.4 KB, 188 views)
Attached Files
File Type: zip ResizeFormExample v2.3 + Zoom.zip (301.1 KB, 30 views)
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by isladogs; 03-13-2019 at 01:17 AM.
isladogs is offline   Reply With Quote
The Following 2 Users Say Thank You to isladogs For This Useful Post:
coypu (03-12-2019), lpapad (03-11-2019)
Old 03-12-2019, 11:12 PM   #5
Tera
Newly Registered User
 
Join Date: Feb 2019
Posts: 92
Thanks: 119
Thanked 4 Times in 4 Posts
Tera is on a distinguished road
Re: ResizeForm Me - An Automatic Form Resizing Tutorial

This is from version 2.3



Attachments Pending Approval
File Type: jpg 2019-03-13_16-08-16.jpg
File Type: jpg 2019-03-13_16-07-48.jpg
Tera is offline   Reply With Quote
Old 03-13-2019, 01:13 AM   #6
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 8,582
Thanks: 102
Thanked 2,255 Times in 2,082 Posts
isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all
Re: ResizeForm Me - An Automatic Form Resizing Tutorial

OOPS - The common controls references shouldn't be there and can be removed.

I added them temporarily to help answer a question about these not being available in 64-bit Access ... and then forgot to remove them!

However another standard reference needs to be restored: Microsoft Office xx.0 Access database engine object library (ACEDAO.dll)



Version 2.4 attached with references fixed
Attached Images
File Type: png Refs.PNG (12.4 KB, 115 views)
Attached Files
File Type: zip ResizeFormExample v2.4 + Zoom.zip (291.6 KB, 16 views)
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
The Following User Says Thank You to isladogs For This Useful Post:
Tera (03-13-2019)
Old 03-13-2019, 09:20 AM   #7
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 8,582
Thanks: 102
Thanked 2,255 Times in 2,082 Posts
isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all
Re: ResizeForm Me - An Automatic Form Resizing Tutorial

Further update to version 2.5
This fixes a major issue using form resizing code with tabbed document display option
Until now, this option caused forms to be shifted down & to the right

As I never use the tabbed documents option, it never worried me enough to fix it.
However the fix is ridiculously simple and has now been added to the ResizeForm procedure in modResizeForm

The UseMDIMode property is 1 for overlapping windows and 0 for tabbed documents
After resizing, the code fix maximizes then minimizes the navigation pane if tabbed documents are in use

Code:
  If CurrentDb.Properties("UseMDIMode") = 0 Then
        MaximizeNavigationPane
        DoEvents
        MinimizeNavigationPane
    End If
Doing this is sufficient to reset the form positioning correctly.
It has been tested successfully with document tabs both visible / hidden.
No fix is required for overlapping windows

Version 2.5 also includes a simple popup form with adjustable zoom from 50% to 150% of default size. Hopefully someone will find a use for that!

New example app & PDF help file attached
Attached Files
File Type: zip ResizeFormExample v2.5 + Zoom.zip (315.5 KB, 23 views)
File Type: zip ResizeForm Me PDF v2.5.zip (1.78 MB, 32 views)

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by isladogs; 03-13-2019 at 10:11 AM.
isladogs is offline   Reply With Quote
The Following User Says Thank You to isladogs For This Useful Post:
Tera (03-13-2019)
Old 03-13-2019, 03:48 PM   #8
Tera
Newly Registered User
 
Join Date: Feb 2019
Posts: 92
Thanks: 119
Thanked 4 Times in 4 Posts
Tera is on a distinguished road
Re: ResizeForm Me - An Automatic Form Resizing Tutorial

Let me thank you for all the time and effort you put on these articles and sharing your knowledge and experience.
Just one question if you don't mind.

I've noticed almost all of your databases use this Resize function, before you posted this article here. It was very interesting and I took my time to go through the code and the structure and design of the forms.

One thing that remained a puzzle to me and I couldn't understand was How do you design your forms? Obviously as you explained in your site, Stretching is much easier than shrinking. When I open one of your forms in design view, the form, controls, and text is so tiny that designing and moving around is not that simple.
How do you add/move the controls when you're in design mode?
Tera is offline   Reply With Quote
Old 03-13-2019, 04:42 PM   #9
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 8,582
Thanks: 102
Thanked 2,255 Times in 2,082 Posts
isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all
Re: ResizeForm Me - An Automatic Form Resizing Tutorial

Hi
Thanks for your feedback

I use a 22 inch monitor with a resolution of 1680X1050.
The 'default' form size I use is based on the 800x600 example template and a Calibri 7pt font size.

This is mainly due to historical reasons - I've been using the code since 2005 when monitors were smaller & resolutions much lower. It was important to always use a base resolution as low as the lowest used by my clients

Bear in mind that I'm no longer young and need to wear glasses at all times.
However, I find that still works for me. In any case, it would be too disruptive to go back & 'upsize' several thousand older forms now

However, if I was starting up now, I would probably base my forms on a base resolution of 1280x960 and font size= 9/10pt.

For info, I've now posted an updated version of my website article with additional information, tips & hints.
See http://www.mendipdatasystems.co.uk/a...g-1/4594554784
I will further update the PDF to match that article in the next day or two
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by isladogs; 03-13-2019 at 04:46 PM. Reason: Add link
isladogs is offline   Reply With Quote
The Following User Says Thank You to isladogs For This Useful Post:
Tera (03-13-2019)
Old 03-14-2019, 06:54 AM   #10
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 8,582
Thanks: 102
Thanked 2,255 Times in 2,082 Posts
isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all
Re: ResizeForm Me - An Automatic Form Resizing Tutorial

As mentioned in my last reply, I've done a further (and hopefully final) update to version 2.6.
This is now available from my website: http://www.mendipdatasystems.co.uk/a...g-1/4594554784

Main changes:
a) Minor bug fixes in error handling in modResizeForm
b) Additional tips / hints and further explanation of the code in both the PDF & web article.
Unfortunately the PDF is now more than 2MB after zipping so I'm unable to upload it here

As previously mentioned the code now works with both overlapping windows and tabbed documents

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
The Following User Says Thank You to isladogs For This Useful Post:
Tera (03-14-2019)
Reply

Tags
automatic form resizing , jamie czernik , open source

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a tutorial on a form or report johnherrerajuan Forms 1 05-06-2013 09:27 AM
Subform/tabbed form tutorial Ani Forms 1 09-24-2012 07:56 AM
Following Query Form Tutorial, Not Working... Help? slkasulke Forms 6 06-06-2012 05:55 AM
[SOLVED] QBF (Query by Form) advice/tutorial/example appreciated! mack225 Forms 1 07-07-2006 11:34 AM
Password Protecting a Form - Microsoft Tutorial Error JVermast Forms 7 07-25-2005 06:56 AM




All times are GMT -8. The time now is 08:59 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World