How to change form.control.name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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?
 
Back
Top