Label naming in tab controls

  • Thread starter Thread starter Ben Thomason
  • Start date Start date
B

Ben Thomason

If I try to display the same field from a query in
multiple tabs of a tab control only the first instance
shows the correct label name. All other instances simply
show "Text" as the label. Is there any way to display the
same field on multiple tabs without having to manually
change the label so that they are all the same?
 
Ben,
Since you already had a label called (ex. lblAcctNo) when you created
copies on other tabs, Access won't use the same name for them. Since Labels
can be addressed programatically, it would violate the Access "naming" rules
to have duplicate label names.
It's the same rule for any control on a form (text, List, combo, etc..).
No objects on a form can have the same name.
You'll need to give each a unique name, such as...
lblAcctNo1, lblAcctNo2, etc...
 
Ben Thomason said:
If I try to display the same field from a query in
multiple tabs of a tab control only the first instance
shows the correct label name. All other instances simply
show "Text" as the label. Is there any way to display the
same field on multiple tabs without having to manually
change the label so that they are all the same?

If you place the control on the form instead of on a TabControl page, then you
can position it "behind" the TabControl and you will see it on all pages without
having to create multiple copies. That assumes you want to see it in the same
place on all Tab Pages though.
 
Back
Top