Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change Tap Captions based on a control 1

Status
Not open for further replies.

Quotidius

Technical User
Jan 27, 2002
29
0
0
US
My mainForm is a single form that shows each employee. On the detail of mainForm are 5 tabs and each tab contains a unique subform. Each of these subforms has a control called "Core_Description."

Core_Description will vary from employee to employee. How can I set tab1 caption to equal the Core_Description that is contained on Tab1's subform?

Thanks
 
How about:

Me.TabCtl0.Pages(1).Caption = Me.tblTable_subform.Form.Core_Description
 
Thanks Remou

Using the OnCurrent Event I tried something like that (found in another thread) but I get the following problem when I open the form:

"Visual Basic for Applications (VBA) encountered a problem while attempting to access a property or method. The problem may be one of the following:
A reference is missing.
For help restoring missing references, see the Microsoft Knowledge Base article 283806.
An Expression is misspelled.
Check all expressions used in event properties for correct spelling."

Even changing to a more basic:
Me.TabCtl27.Pages(0).Caption = "test"
yields the same result.

Any Suggestions as to what is causing this problem
 
Just guessing. Are you using the Current event of the main form?
 
Yes, Remou, the current event of the main form, the one that has the tabs.

Also here is an addendum to the the last post of mine-the initial form pronouncing my error reads, " A problem occurred while myDB was communicating with the OLE Server or ActiveX Control.
 
All is right (the usual operator error). Thanks Remou!
 
Ah, you may have a corrupt form and / or database. Try creating a test form in a new database. If that works, have a look at Decompile in FAQ705-4683.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top