Changing a tab name depending if information is contained in a field

AdamO

Registered User.
Local time
Today, 09:20
Joined
Jun 26, 2002
Messages
40
I have a form with a tab control. The users required that the tab control changed colour depending on whether any information was contained within one of the fields on tab concerned.

As I understand it, you cannot change the colour of these tab controls, so I looked for a different solution.

One was to change the caption, and I found so code on this forum as follows:

MY FIELDS:
Tab name 'Income & Notes'
Field I want to refer to: 'ClientNotes'

CODE:
This is placed in 'OnCurrent' on the main form.

If IsNull(Me!txtClientNotes)Then
Me!pagAddress.Caption = 'Income & no notes'

Else
Me!pagAddress.Caption = 'Income & notes'

End If

Unfortunately, I am receiving errors on all lines of the code which has baffled me and I would appreciate any pointers as to where I am going wrong.

Another option code be to put a box above the tab control and have this change colour depending on whether any information was contained in ClientNotes. Again, I have tried this without success using Conditional Formatting.

I look forward to any guidance.
 
i tried the following and it worked:

If IsNull(Me.test) Then
Me.Page1.Caption = "Page 10"
End If


Make sure that your fieldnames and pagenames are correct.
 

Users who are viewing this thread

Back
Top Bottom