keeping a control property after run time

  • Thread starter Thread starter Jake
  • Start date Start date
J

Jake

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
 
Jake said:
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?

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.
 
Thanks Dirk,
I appreciate the info.
Jake
Dirk Goldgar said:
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.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
Back
Top