Caption - Follow Up

G

Guest

Earlier I asked if it was possible to alter the name of the tab on a 10 page
tab control based upon if data was entered in a field in that particular tab.
I have been told that I cannot change the font or color of the font.
However, it seems that I can change the caption on the tab. With this said
here is my question:

In my form I have a tab control with 10 pages. In each
page is a variety of date fields. How can I
programically set the caption of each page to include the term "entered"
after the current wording if there is data in the first data field within
that particular page?
 
J

John Vinson

Earlier I asked if it was possible to alter the name of the tab on a 10 page
tab control based upon if data was entered in a field in that particular tab.
I have been told that I cannot change the font or color of the font.
However, it seems that I can change the caption on the tab. With this said
here is my question:

In my form I have a tab control with 10 pages. In each
page is a variety of date fields. How can I
programically set the caption of each page to include the term "entered"
after the current wording if there is data in the first data field within
that particular page?

First off - bear in mind that the data is not stored on the Form, just
displayed and edited there.

Secondly, note that with a graphical user interface, you have NO
assurance that having the "first" control on each tab page filled or
empty gives you any clue about any other controls on that page. The
user could tab or mouseclick to controls in any order they wish.

That borne in mind, you can use the Form's Current event *and* the
AfterUpdate event of each "first" data field to change the caption
property of each page of the tab control. Air code, probably needs
work:

Private Sub Form_Current()
If Not IsNull(Me!txtControl1OnPage1) Then
Me!pgTabControl.Pages(0).Caption = "Complete"
End If
<etc for remaining pages>

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
G

Guest

Thanks John. Your codes works great!

John Vinson said:
First off - bear in mind that the data is not stored on the Form, just
displayed and edited there.

Secondly, note that with a graphical user interface, you have NO
assurance that having the "first" control on each tab page filled or
empty gives you any clue about any other controls on that page. The
user could tab or mouseclick to controls in any order they wish.

That borne in mind, you can use the Form's Current event *and* the
AfterUpdate event of each "first" data field to change the caption
property of each page of the tab control. Air code, probably needs
work:

Private Sub Form_Current()
If Not IsNull(Me!txtControl1OnPage1) Then
Me!pgTabControl.Pages(0).Caption = "Complete"
End If
<etc for remaining pages>

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

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