Rename Access labels in a form

  • Thread starter babyatx13 via AccessMonster.com
  • Start date
B

babyatx13 via AccessMonster.com

I have a database that someone else created. I have several forms that have
lots of labels on them that are attached to code. Not all forms are uniform
and I want to make them that way. Instead of moving each label around I
deleted the whole lot and copied the format I want from another form into the
new form. The new label names don’t correspond with the old labels code. Is
there a way I can rename the labels programmatically instead of changing each
individual name? thanks KB
 
M

Michael J. Strickland

babyatx13 via AccessMonster.com said:
I have a database that someone else created. I have several forms that
have
lots of labels on them that are attached to code. Not all forms are
uniform
and I want to make them that way. Instead of moving each label around
I
deleted the whole lot and copied the format I want from another form
into the
new form. The new label names don’t correspond with the old labels
code. Is
there a way I can rename the labels programmatically instead of
changing each
individual name? thanks KB


I think even if you do it programmatically (e.g. by cycling through the
controls collection, selecting label controls, ...) you will still have
to type in the new label names unless you have them in a list somewhere
and can read them from disk.

You might try writing a procedure to open the old form, iterate through
each label, read its name and then write that name to the corresponding
label on the new form but if they aren't in the same order in the
controls collection of both forms, you will end up with mis-assignments.



--
 
B

babyatx13 via AccessMonster.com

All the code is the same for all the forms so the labels need to match the
code.
I am just numbering the labels.

Ex. Lable0, Label1, Label2 etc….
Thank you both for your input
KB
I have a database that someone else created. I have several forms that
have
[quoted text clipped - 9 lines]
changing each
individual name? thanks KB

I think even if you do it programmatically (e.g. by cycling through the
controls collection, selecting label controls, ...) you will still have
to type in the new label names unless you have them in a list somewhere
and can read them from disk.

You might try writing a procedure to open the old form, iterate through
each label, read its name and then write that name to the corresponding
label on the new form but if they aren't in the same order in the
controls collection of both forms, you will end up with mis-assignments.
 

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

Top