Solved What am I doing wrong...For Each (3 Viewers)

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 05:24
Joined
Feb 28, 2001
Messages
27,191
Just as a "comment from the peanut gallery" here, I used to have the "can't hide a control that has focus" error until I took a hard look at the screen and found a control that was never eligible for hiding. Then I set focus to that control before I did the hide operation. Understand that doing so will trigger two more events... a _LostFocus from where you are and a _GotFocus to where you are going.
 

zeroaccess

Active member
Local time
Today, 05:24
Joined
Jan 30, 2020
Messages
671
Just as a "comment from the peanut gallery" here, I used to have the "can't hide a control that has focus" error until I took a hard look at the screen and found a control that was never eligible for hiding. Then I set focus to that control before I did the hide operation. Understand that doing so will trigger two more events... a _LostFocus from where you are and a _GotFocus to where you are going.
Yep, we can't hide a control that has the focus, so I set focus to a transparent button first. One of the quirks we live with for Access!
 

isladogs

MVP / VIP
Local time
Today, 11:24
Joined
Jan 14, 2017
Messages
18,235
Thanks. I don't have a UA account, but I have thought about this and designed everything to fit well within the screen space we have at work.

I will refer back to this if I run into any issues.

EDIT: it sounds like that code is resizing controls and forms? If so, I don't agree with that approach. That is not how Microsoft designs any of their programs. You want everything to stay the same size. If someone upgrades their monitor, extra screen space should be extra real estate and not just larger everything. Of course I could be misinterpreting as again I can not download that demo.

I haven't looked at the UA demo so I can't tell you what it does.
My code definitely resizes both forms and controls. Did you look at my demo or at least read the article?

You may be fortunate in that all your users have identical size and shape monitors as well as identical resolutions.
However I work with a wide range of clients all of whom have users with a variety of monitor sizes, form factors and resolutions...as well as different versions and bitnesses of Access. In addition some users may have sight problems..
Therefore my code is designed to cater for all end users and ensure each has a good experience when using my apps.

I completely disagree with your comments about MS not designing any of their programs like that.
Several Office programs such as Word and Excel have built in zoom features.
Access has fairly limited built-in support for resizing via the anchoring feature.
Automatic form resizing together with an optional zoom feature extends that capability to cover a feature that should be built in as standard
 

isladogs

MVP / VIP
Local time
Today, 11:24
Joined
Jan 14, 2017
Messages
18,235
Yep, we can't hide a control that has the focus, so I set focus to a transparent button first. One of the quirks we live with for Access!

Why is that a quirk in your opinion? It seems totally logical to me
 

zeroaccess

Active member
Local time
Today, 05:24
Joined
Jan 30, 2020
Messages
671
Several Office programs such as Word and Excel have built in zoom features.
Access has fairly limited built-in support for resizing via the anchoring feature.
Automatic form resizing together with an optional zoom feature extends that capability to cover a feature that should be built in as standard
Zooming text is one thing - I do that in my browser - I thought we were referring to enlarging the interface.

Windows has a screen scaling setting that I also use.

I'm not doubting your use cases. I just want it to be optional for the user and if I bake it in and make it automatic, I'm taking away that choice.
 

isladogs

MVP / VIP
Local time
Today, 11:24
Joined
Jan 14, 2017
Messages
18,235
I am talking about the interface. A zoom box has a different meaning.
As part of my resizing code, I have a feature to allow optional zooming of individual forms by the user from say 75% to 125%.

FWIW form resizing could be a user option.
However having used it for over 15 years with several thousand users, no user has ever requested that it be removed or made optional.
Perhaps you could spare a few minutes to read my article ….😏
 

zeroaccess

Active member
Local time
Today, 05:24
Joined
Jan 30, 2020
Messages
671
I am talking about the interface. A zoom box has a different meaning.
As part of my resizing code, I have a feature to allow optional zooming of individual forms by the user from say 75% to 125%.

FWIW form resizing could be a user option.
However having used it for over 15 years with several thousand users, no user has ever requested that it be removed or made optional.
Perhaps you could spare a few minutes to read my article ….😏
I will. I am sure you have put much work and thought into it.

Thank you everyone for the help!
 

Users who are viewing this thread

Top Bottom