Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

Saving properties on Open form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
FBxiii - 15 May 2007 16:33 GMT
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.
Klatuu - 15 May 2007 18:58 GMT
You can save changes to the form and its properties when you close it.

Docmd.Close acForm, Me.Name, acSaveYes

Signature

Dave Hargis, Microsoft Access MVP

> Hi.
>
[quoted text clipped - 6 lines]
> Thanks,
> Steve.
Rick Brandt - 15 May 2007 19:10 GMT
> 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".

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Klatuu - 15 May 2007 19:39 GMT
After doing some testing, I see you are correct.

Signature

Dave Hargis, Microsoft Access MVP

> > You can save changes to the form and its properties when you close it.
> >
[quoted text clipped - 3 lines]
> both 2000 and 2002/2003 file formats and after setting "Allow Design
> Changes - All Views".
missinglinq - 15 May 2007 21:22 GMT
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.

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Klatuu - 15 May 2007 21:33 GMT
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.
Signature

Dave Hargis, Microsoft Access MVP

> 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
[quoted text clipped - 4 lines]
> in the world would you want to? Just make a small utility table to hold the
> setting.
Rick Brandt - 15 May 2007 22:33 GMT
> 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.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Klatuu - 16 May 2007 13:03 GMT
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).
Signature

Dave Hargis, Microsoft Access MVP

> > 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.
[quoted text clipped - 3 lines]
> settings are?  That's a suprise to me.  Also I believe form position and
> size might also be saved.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.