Amend Format Settings on Form’s Property Sheet

Cotswold

Active member
Local time
Today, 16:55
Joined
Dec 31, 2020
Messages
648
Whilst I can change position, size, colours and just about any setting to objects on a form using VBA.
They aren’t permanently saved into the Property Sheet pages in the Access IDE.

Is there a method of permanently saving changes made using VBA to settings like TextAlign, Width, Left, FontName etc directly into the Format, Data, or Other page in the form's Property Sheet?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(whilst I will appreciate any help at all on this issue.
I may not be able to respond within half an hour)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Format settings made in design mode are typically saved (if the user chooses). In the past, I have created a table of this information by form, control, and property. When the form is opened, I used code to read the settings from the table and set them.
 
I would expect you would need to open the form in design mode, just as you would manually?
 
Just curious, try closing the form using the acSaveYes parameter.
 
When designing your app’s UI/UX, start by setting the default properties for your form. This includes adding logos, icons, and adjusting the overall look and feel. After making these changes, save your work.

Allowing users to adjust properties while the form is open is fine and can enhance their experience. But if you want their changes to be saved and visible the next time they open the form, you need to store these settings somewhere and load them when the form starts.

Where you store these settings depends on your needs. For changes that should only last for the current session, use TempVars. If you want the changes to be saved for the user across sessions, store them in a table designed for that purpose. That is just an example, of course. The end behavior depends on your true needs. All of this is usually called UI State Management.

If you need to change default settings using VBA, you must do it in design mode. Switch to design view, make your changes, and then save. After saving, you’ll need to reopen the form to see the changes. Be aware that these changes will become the new defaults, and you won’t be able to revert to the previous default settings.

This process is part of form design, not UI State Management. It’s similar to the initial design of the form. The key difference is that with State Management, each user can customize their form according to their preferences. Without State Management, all users are stuck with the default settings, and it will lead to frustration in multi user environments.

This website is an example of UI State Management in action. For instance, I can disable the Watercooler board, which makes me happy. But if you like the Watercooler, you wouldn’t be happy with my choice. You’d likely re-enable it, which would frustrate me and create a poor experience. Now imagine this scenario with hundreds of users, it would be a mess, an interesting one though.

EDITED.
 
Last edited:
Many thanks for all your suggestions. The more I think about this, the less I think it will be possible. I cannot see any way that I can write back to the IDE settings.
Loading settings when the form opens is fine and I do that all the time. Most of them I have in standard code on the form, ot in modules. I'm basically trying to remove as much of the manual repetitious coding drudgery as possible when creating a new form. Regarding the UI, I don't tend to allow users to have too many options. In fact none is my preference.

Maybe I've taken it as far as I can but I'll keep going back to it.
 

Users who are viewing this thread

Back
Top Bottom