Avatar of bfuchs
bfuchs
Flag for United States of America asked on

Code to rename all controls of a form.

Hi Experts,
Looking for code that will open a form in design mode, loop thru all controls and change their name to "txt" &  their control source.
Thanks
Microsoft Access

Avatar of undefined
Last Comment
bfuchs

8/22/2022 - Mon
Martin Liss

Unless you want to write an add-in or find on on the web that does it, you can't run code in design mode.
ASKER CERTIFIED SOLUTION
ste5an

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Martin Liss

@ste5an: Note that he says "in design mode".
ste5an

That's what acDesign does ;)
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
bfuchs

ASKER
Thank you!
bfuchs

ASKER
@Martin,
Is this a question about Classic Visual Basic which is VB6 or Access?
I happened to use Access but doesn't the same question/answer applied to VB as well (except for Access.TextBox)?
The reason I include that in the topic is that I can get VB folks look into as well. (By now if you feel like removing is ok with me:)
Thanks,
Ben
Martin Liss

That's for you to decide, but I can say that Classic Visual Basic is an outdated (sniff) language which is stand-alone and can no be used inside any Office product including Access, Excel, Word and Visio). On the other hand VBA which is very similar to VB6 can be, so would you like me to add that topic?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
bfuchs

ASKER
but I can say that Classic Visual Basic is an outdated
Well under VB Classic there are 164K users assigned, while for VBA I see only 11K, guess by selecting VB I get more attention...
so would you like me to add that topic?
It doesnt matter as the issue has been resolved.
Thanks,
Ben