How to change form.control.name

H

Harry H

Hi all, I have a form with a two page Tab control. I am trying to use VBA to
change the name of these pages without any success. Access error said that
the control is in use. I have tried the following

Forms("Form 1").controls("TabCtl").pages(0).name = "ABC"
Forms("Form 1").controls("TabCtl").pages(1).name = "XYZ"

any suggestions and sample code is appreciated. Thanks in advance.
 
R

Rick Brandt

Harry H said:
Hi all, I have a form with a two page Tab control. I am trying to use VBA to
change the name of these pages without any success. Access error said that
the control is in use. I have tried the following

Forms("Form 1").controls("TabCtl").pages(0).name = "ABC"
Forms("Form 1").controls("TabCtl").pages(1).name = "XYZ"

any suggestions and sample code is appreciated. Thanks in advance.

Why on earth would you need to change the name of a TabPage during runtime? Are
you sure you don't actually want to change the caption?
 

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