Previous Thread

7/6/2006 7:30:01 AM    saving control properties (e.g. backcolor after a click) @ runtime
In Access 2003, on a form, I can change properties during runtime for 
 
controls using VBA (for example... changing the backcolor of a label if it's 
 
been clicked), but I would like to update the color permanently using code 
 
during runtime so that the next time I call the form, the label is now the 
 
new color.  Please help!  Thanks....



7/6/2006 7:41:09 AM    Re: saving control properties (e.g. backcolor after a click) @ runtime
Hi, 
 
2 do this u need to save ur details of colors in registry and retrieve 
 
it while loading ur form the next time. u can save details in registry 
 
using save settings and get settings. through code. 
 
best reguards 
 
fd

7/6/2006 8:01:27 AM    Re: saving control properties (e.g. backcolor after a click) @ runtime
On Thu, 6 Jul 2006 07:30:01 -0700, Dilemma Dave wrote: 
 
To save the changes, you need to open the form in Design View, make 
 
the changes, then save the form. 
 
I have no idea how you are currently doing this, but here is an 
 
example, using code in the already open form to permanently change the 
 
Backcolor of a label: 
 
You can place this code in the label's double-click event. 
 
DoCmd.Echo False 
 
DoCmd.OpenForm "FormName", acDesign, , , , acHidden 
 
forms!FormName!LabelName.BackColor = vbRed 
 
DoCmd.Close acForm, "FormName", acSaveYes 
 
DoCmd.OpenForm "FormName" 
 
DoCmd.Echo True 
 
-- 
 
Fred 
 
Please respond only to this newsgroup. 
 
I do not reply to personal e-mail

7/6/2006 10:53:32 AM    Re: saving control properties (e.g. backcolor after a click) @ runtime
Sounds simple, but that would be a HUGE NO NO.  It will do 
 
what you say, but the Database Bloat may rapidly get out of 
 
control, which in turn will force way more frequent Compact 
 
operations.  In addition, both the save and the compact 
 
operations greatly increase the chances of corruption, which 
 
then requires a more frequent and more robust backup 
 
procedure.  Furthermore, you can not save an object's design 
 
when you get around to making the application into an MDE or 
 
distributing it with Access runtime. 
 
-- 
 
Marsh 
 
MVP [MS Access] 
 
Klatuu wrote:

7/6/2006 10:58:09 AM    Re: saving control properties (e.g. backcolor after a click) @ run
Instead of using the registry, save the info using Access's 
 
natural data storage: tables.  Records in a table are far 
 
easier to use than registry entries. 
 
-- 
 
Marsh 
 
MVP [MS Access] 
 
Dilemma Dave wrote: