Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Tab Control Colour Change

Posted on 1998-06-30
6
Medium Priority
?
321 Views
Last Modified: 2008-03-10
I have a tab control page in an Access 97 containing approximately 20 pages and I need the tab control text to change colour when a user has clicked and entered that page. When the user exits the database the next user must encounter the same process. This will allow each user to know when they have visited and completed a particular page. Does anyone know how I might be able to apply this?
0
Comment
Question by:djadams
6 Comments
 
LVL 6

Accepted Solution

by:
devtha earned 300 total points
ID: 1976005
On the Gotfocus event of each TAB put in the followin code:

TAB.text I am not sure about the 7 syntax.
text.forecolor = rgb(255,0,0) 'Red color

On lostfocus event
text.forecolor = rgb(0,0,0) 'black



0
 
LVL 7

Expert Comment

by:Victor Spiridonov
ID: 1976006
What text do you want to change? Tab control itself doesn't have colour property.
0
 
LVL 12

Expert Comment

by:Trygve
ID: 1976007
In addition to devthas suggestion, you will have to save the users "currentpage" into some table and read from this every time the user opens the form. This way you will be able to present him/her with the page the was active when the form closed down.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:djadams
ID: 1976008
Devtha, there is no Gotfocus or Lostfocus event in the properties for tabs within a control page. Am I looking in the wrong place or have I misunderstood your answer? It is only the Tab label text that needs to change.
0
 
LVL 7

Expert Comment

by:Victor Spiridonov
ID: 1976009
You can't change Tab label text.
0
 
LVL 6

Expert Comment

by:devtha
ID: 1976010
I got a workaround.
I am sorry about the forecolor property.
What you can do is make a small bitmap file with text on it and then change the bitmap when you click the tabpage.
page1.picure = "c:\windows\help.bmp"

This will display the bmp as text HELP. on the tab page.

Devtha
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question