Change Control's Caption (Perminately)

jaji03

New member
Local time
Today, 08:18
Joined
Mar 31, 2007
Messages
2
Hello,

I've been trying to change the caption of a command button in a Form. I can make it change, but then when the form is closed and re-opened, it goes back to what it previously was.


Example:
Me.CmdUpdate.Caption = "Updated"



Anybody knows how I can perminantely change the caption?

Thanks for your help :D
 
You have to save the form for a caption change to be permanent.

I'm not entirely sure that you can save a form open in Form view. Design view, no sweat. But in Form view it might be locked. Not good for what you want if you want it to be programmatic.

Just for clarification, this is now I know you have the significant form open in Form view: I see that you are using ME.xxx syntax. Me.xxx is only valid in the class module, which you cannot be running unless the form is open in Form view.
 
The only way is to open the form in design mode, change it, save it, and then close it.

Or, you could store the value in a table and use either a SQL statement, or DLookup, when opening the form to set it.
 

Users who are viewing this thread

Back
Top Bottom