Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling the color pallete when program is running 2

Status
Not open for further replies.

zevw

MIS
Jul 3, 2001
697
US
Is there a way through code, that the user clicks on a certain button and has the option to select the colors they want by calling the color pallete, for instance to change the colors of the startup form. Naturally I do not want the user to be in design view, so I would like to give them a second form where they select the color they want and based on those values the startup form will be formatted. Thanks in advance for you help.
 
zevw,
Check out Microsoft: Help and Support ACC: Sample Function to Use the COMMDLG Color Dialog Box for information on how to package the Common Dialog Color Dialog Box in your Access (or any Office) application.

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
As Caution states you need to use the COMMDLG color dialog box. You have more considerations for what you want to do though. For the user to "customize" his experience with your software, you will need to devise a data storage method (db or registry if you are brave) and will need to apply these colors at form load.

Just a matter of saving the choice and loading at runtime.


Andy Baldwin

"Testing is the most overlooked programming language on the books!"

Ask a great question, get a great answer. Ask a vague question, get a vague answer.
Find out how to get great answers FAQ219-2884.
 
Remou

I tried adding the ActiveX CommonDialog Control to the form but it is telling me that I do not have the required license. I wonder isn't the CommonDialog control part of microsoft office 2003. Now what is my next how do I aquire a license and what is then.

I will just review the steps:

1. I will insert the activex control into the form.
2. name it for example as you wrote ActiveXCt10.
3. click on my command button which should then open the color pallete and assign the text box the color I chose.

Am I on the right track here?

Thanks in advance for your help!
 
Remou!

This is the exact error I"m getting.

"You don't have the license required to use this ActiveX control.

You tried to open a form containing an OLE object or an ActiveX control or you tried to create an ActiveX control.

To obtain the appropriate license, contact the company that provides the licensed OLE object or ActiveX control."

I read the support topic from microsoft but do not understand what they mean by creating a userform. I am in a form and have a control. Is there something called a userform?

Sorry maybe I am asking very stupid questions!
 
Thanks Remou!

This API works like a snap!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top