UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Apply Office Theme From Form Control, Access 2016    
 
   
robojo
post Aug 25 2019, 04:39 PM
Post#1



Posts: 5
Joined: 25-August 19



Hello,
I've created a sub to change the control properties on forms to apply a "theme." I call the sub on form load and each controls' backstyle, backcolor, forecolor, etc. are set. This procedure works but I'd like to use the simplest method if possible. I'd like help if possible with 1. Applying an office theme (.thmx) from an active form, and 2. Creating themecolorscheme .xml files.

I know this can be done in the form layout and design views. I would like this to be something a user can select from a form. And, I don't want users to go into those views.

So far I have tried a few codes with dim otheme as officetheme, dim tcolor as themecolor, and dim tcs as themecolorscheme. I've not had any luck in loading a themecolorscheme by tcs.load "file.xml".

Please help with applying the theme and themecolorscheme. I think writing the .xml will be relatively easy, that is less of a priority.
Go to the top of the page
 
theDBguy
post Aug 25 2019, 04:46 PM
Post#2


Access Wiki and Forums Moderator
Posts: 76,316
Joined: 19-June 07
From: SunnySandyEggo


Hi. Welcome to UA! welcome2UA.gif

Just curious, what kind of application are you writing that users would need to change the theme often?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
robojo
post Aug 25 2019, 05:06 PM
Post#3



Posts: 5
Joined: 25-August 19



Thanks for your welcome! I am writing a healthcare db. The users probably won't change the theme often. However, there may be differing preferences by user.
Go to the top of the page
 
theDBguy
post Aug 25 2019, 05:36 PM
Post#4


Access Wiki and Forums Moderator
Posts: 76,316
Joined: 19-June 07
From: SunnySandyEggo


Ah, that brings up another curiosity. Are you developing it in the U.S.?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
robojo
post Aug 25 2019, 05:40 PM
Post#5



Posts: 5
Joined: 25-August 19



Yes, in the US. Thanks
Go to the top of the page
 
GroverParkGeorge
post Aug 26 2019, 09:20 AM
Post#6


UA Admin
Posts: 35,683
Joined: 20-June 02
From: Newcastle, WA


Most seasoned developers would probably not put a lot of emphasis on making it easier for users to change themes in an Access Relational Database Application they create for those users. Therefore, there's probably not a lot of existing information on implementing that as a feature in those applications. In fact, I would say it's more common for developers to invest in creating and implementing their own interface designs.

Would it be acceptable to create a custom ribbon for your Access Relational Database Application with the existing Theme tab and options exposed via that custom ribbon? I think that would be simpler to implement.


--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
theDBguy
post Aug 26 2019, 10:44 AM
Post#7


Access Wiki and Forums Moderator
Posts: 76,316
Joined: 19-June 07
From: SunnySandyEggo


Hi.
QUOTE (robojo)
Yes, in the US. Thanks
Thanks for clarifying that. I am not saying it's not possible to use Access for a "healthcare" database system, but if you have to deal with HIPAA regulations, you might consider using something else. Just a thought...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
GroverParkGeorge
post Aug 26 2019, 11:10 AM
Post#8


UA Admin
Posts: 35,683
Joined: 20-June 02
From: Newcastle, WA


In order to validate my suggestion, I hacked out a quick test of a custom Ribbon to apply themes. It works well. Therefore, instead of trying to do this in VBA, I'd simply go the custom ribbon route and let Access/Office do the heavy lifting.

===========
Sorry, forgot to upload the sample db with a custom ribbon to demo the idea.

Attached File  SampleRibbonforThemes.zip ( 20.56K )Number of downloads: 3

This post has been edited by GroverParkGeorge: Aug 26 2019, 11:23 AM
Reason for edit: added demo

--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
robojo
post Aug 26 2019, 02:11 PM
Post#9



Posts: 5
Joined: 25-August 19



Hi GroverParkGeorge,

Thanks for the suggestion and creating the ribbon. That may definitely be a solution I consider. This worked well (it solved the layout and design view problem, theme can be changed from an active form)!

I get your point about creating my own theme and limiting user options. I essentially wanted to create an option for dark mode. Then I decided not to limit choice to dark mode when I can allow more. I use pop up forms more often than not. I may consider changing that to use the ribbon you made.

Is there not a way to run a ribbon command from a macro or vba?

I appreciate your input!
Go to the top of the page
 
robojo
post Aug 26 2019, 02:20 PM
Post#10



Posts: 5
Joined: 25-August 19



Thanks DBGuy for replying. The DB is a local program. I agree, MS Access would not be my choice for building an extensive healthcare DB. This program is for me and other clinicians I am working with to format our notes in a specific format to meet our department standards.

We have an unreliable web based db that has had so many bugs that no one in our department (and maybe the entire agency) trusts that our notes will be saved. We lose so many notes that it is standard practice for our staff to write notes in word, or, as a result of what I'm working on, a local access db.

The agency has considered other vendors, but I have no real influence over that. So, while we have such an unreliable program, we need something to keep us from losing notes and Access is perfect for that.

My colleagues range in computer literacy, so I want an easy UI where dark mode or other themes can be implemented without a steep learning curve.

Thanks for your feedback!
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    21st September 2019 - 04:19 AM