Saving properties on Open form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
You can save changes to the form and its properties when you close it.

Docmd.Close acForm, Me.Name, acSaveYes
 
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".
 
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.
 
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.
 
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.
 
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).
 
Back
Top