Changing default object properties

  • Thread starter Thread starter lance.schaeffer
  • Start date Start date
L

lance.schaeffer

I have a situation where I am trying to change the default object
property through VBA.

The specific property is the caption of a label.

I have code which updates the label caption to the appropriate text,
but when I close the form and reopen it, I lose the updated value, and
the caption reverts back to the "default" caption as it looks in the MS
Access Properties screen.

My question is, is there anyway to change the caption "permanently",
thus the default property, through VB, or can I only have the change
last for that instance of the form?

The code I'm using currently is

Me!Label.caption = "NewTextHere"

Is there an alternative?

Thanks,

Lance
 
Hi,
only if you open form in design view, change it and then save

you can also make some code to store label caption in a table
 
Hmm,

That won't work (I currently have the same info tracked in a table, but
that info updates each time I change the label. THe goal was to have
that table update, but then to also have the caption update, but then
never update again). I am tracking versions of my application, and
wanted the table to update with each version update, but my label to
NOT update so I could go back through old versions if necessary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top