Saving properties on Open form

F

FBxiii

Hi.

I want to be able to change and save the BackColor of an open form but when
the form is closed and re-opens, the Backcolor reverts back to what it was.

Is it possible to Save the new property value while the form is open? (I
want to try and avoid storing the value in a table)

Thanks,
Steve.
 
K

Klatuu

You can save changes to the form and its properties when you close it.

Docmd.Close acForm, Me.Name, acSaveYes
 
R

Rick Brandt

Klatuu said:
You can save changes to the form and its properties when you close it.

Docmd.Close acForm, Me.Name, acSaveYes

Doesn't work in any version I just tried it in (97, 2K, 2K2, 2K3). Tried
both 2000 and 2002/2003 file formats and after setting "Allow Design
Changes - All Views".
 
M

missinglinq via AccessMonster.com

I've seen a rash of these types questions, here and elsewhere, this week,
where the poster wants to save some bit of data or a setting for the next
time the db opens, but doesn't want to use a table. The only way you can save
things in Access is in a table! You could, I suppose, write your color data
to a text file and then retrieve it on opening the database, or mess around
with storing it in the Windows registry (if you're that brave/stupid) but why
in the world would you want to? Just make a small utility table to hold the
setting.
 
K

Klatuu

I haven't tried this approach, so it is only a brain f**t, but what about
saving it in the Tag property? They do save with acSaveYes.
 
R

Rick Brandt

Klatuu said:
I haven't tried this approach, so it is only a brain f**t, but what
about saving it in the Tag property? They do save with acSaveYes.

I wonder if its documented anywhere just what IS saved with acSaveYes.
Changes to Filter and OrderBy I believe are, and you say Tag property
settings are? That's a suprise to me. Also I believe form position and
size might also be saved.
 
K

Klatuu

Yes, Tag is. I have a class module that uses managed Tag values. I picked
the idea up from Access 200 Developer's Handbook (can't remember if it was
Desktop or Enterprise).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top