Save forecolor and backcolor for datasheet view subform (1 Viewer)

hk1

Registered User.
Local time
Today, 12:36
Joined
Sep 1, 2009
Messages
121
We are using Access 2007 and Access 2010. Our users like to change the background color and foreground color on their datasheet view subforms.

I tried to maintain their settings by saving the backcolor and forecolor for each control to my text-based settings file. However, this doesn't work since it actually saves the colors in which these controls were programmed.

When the user changes their colors during runtime (full version of Access but form is not in design view), how can I access these properties to save them and apply them later?
 

boblarson

Smeghead
Local time
Today, 11:36
Joined
Jan 12, 2001
Messages
32,059
You'll need a table to save the user preferences - something like this:

PrefID - Autonumber (PK)
UserID - Text
PrefName - Text
PrefValue - Text

and then you can store the values when closing by using:

Me.DatasheetBackColor

and

Me.DatasheetForeColor

and you would use an update query to update their user preferences to those and then use a DLookup when loading the form.
 

hk1

Registered User.
Local time
Today, 12:36
Joined
Sep 1, 2009
Messages
121
ok, those properties were the main thing I needed. I have a module already that handles saving and retrieving values to a text file, which I prefer over a table for anything that isn't a global setting.
 

Users who are viewing this thread

Top Bottom