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 / April 2005

Tip: Looking for answers? Try searching our database.

keeping a control property after run time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jake - 07 Apr 2005 21:18 GMT
I would like a user to enter a caption for a label in the form header.  So I
coded a button as follows:

Private Sub Command41_Click()
Dim x As String
x = InputBox("Enter Title", "Title")
Me.Label25.Caption = x
End Sub

This works fine, but when i close the form and open it again the new caption
is lost and Access reverts back to the caption design properties of the
control.  Is there a way to have the caption preserved, but enable the user
to change it?

Thanks for any help,
Jake
Dirk Goldgar - 07 Apr 2005 22:55 GMT
> I would like a user to enter a caption for a label in the form
> header.  So I coded a button as follows:
[quoted text clipped - 9 lines]
> properties of the control.  Is there a way to have the caption
> preserved, but enable the user to change it?

With very few exceptions (Filter and OrderBy properties, for example),
design changes made in form view can't be saved.  You could
*conceivably* flip the form into design view and save it, but I think
your best bet is to save the caption information and any other
user-configurable info in a table, and then read and apply the
configuration data every time the form is opened.

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Jake - 08 Apr 2005 14:59 GMT
Thanks Dirk,
I appreciate the info.
Jake
>> I would like a user to enter a caption for a label in the form
>> header.  So I coded a button as follows:
[quoted text clipped - 16 lines]
> user-configurable info in a table, and then read and apply the
> configuration data every time the form is opened.
 
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.