Input box to change field label

  • Thread starter Thread starter eeeman
  • Start date Start date
E

eeeman

Guest
I am trying to get an input box entry to change a label on an Access 2000 form. Below is the code I am using:

Private Sub Text101_DblClick(Cancel As Integer)
Dim CustField As String
CustField = InputBox("Enter Name of Field", "Customize Field Name")
Me.Label102.Caption = CustField
End Sub

When a user double clicks on a field, an input box appears and the corresponding label changes. But when I close the form, the label reverts back to its previous name or caption. How can I make this change permanent?

Thanks,

Eric
 
You would need to open the form in design view from code to make this change permanent. I'm not sure you can do this if the form is also open in form view.

Another way to do this would be to create a table to hold the cusomization data and then in the form's Load event, change the labels.
 

Users who are viewing this thread

Back
Top Bottom