UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Colour Code Label, Access 2010    
 
   
Jonny45wakey
post Jun 29 2020, 04:15 AM
Post#1



Posts: 16
Joined: 8-June 20



Hi All

Wondering if anyone can assist with the following request for help?

I have a form with a basic Gantt Chart on it (see attached image), across the top of the Gantt Chart is a blue label with the week number in it, i have added a non-visible text box to the form which contains the [txtcurrent date] (ww) week number and what i would like to happen is that on form open or load event the label with week number corresponding to the [txtCurrentWeek] changes to red

Any ideas on how to do this?

Thanks

Jonny
Attached File(s)
Attached File  Capture.JPG ( 84.17K )Number of downloads: 13
 
Go to the top of the page
 
mike60smart
post Jun 29 2020, 05:02 AM
Post#2


UtterAccess VIP
Posts: 14,034
Joined: 6-June 05
From: Dunbar,Scotland


Hi

Have you tried Conditional Formatting?


--------------------
Hope this helps?

Mike

Get happiness out of your work or you may never know what happiness is.

Go to the top of the page
 
missinglinq
post Jun 29 2020, 07:34 PM
Post#3



Posts: 4,704
Joined: 11-November 02



There is no Conditional Formatting for Labels... you'd have to substitute Textboxes for the Labels and then use CF.

Linq ;0)>
This post has been edited by missinglinq: Jun 29 2020, 07:35 PM

--------------------
BTW...The Monkey is laughing at me...not at any other poster!

The problem with making anything foolproof...is that fools are so darn ingenious!

All posts/responses based on Access 2003/2007
Go to the top of the page
 
BentBrain
post Jun 30 2020, 10:30 PM
Post#4



Posts: 570
Joined: 10-February 03
From: Thailand


Hi Jonny,
we had a similar issue and even tried stacked bar graphs to show the data.

Resolved by using text boxes and changing back color as needed. See image
Attached File  Capture.JPG ( 123.58K )Number of downloads: 3



Regards
BB

--------------------
"There is no excellent beauty that hath not some strangeness in the proportion" Francis Bacon
Go to the top of the page
 
Peter Hibbs
post Jul 1 2020, 02:33 AM
Post#5


UtterAccess VIP
Posts: 1,809
Joined: 17-June 10
From: Dorset. UK.


Hi Jonny,

You haven't really provided enough information to give a complete answer but assuming that the label controls are named something label1 to label52 and the Text box that holds the week number is called txtWeekNo (or whatever) then the code below should do what you want.
CODE
Me("Label" & Me.txtWeekNo).BackColor = vbRed

Just place this line in the Open event of the form. If you are changing the week number at run time which would mean a different week being shown in red then you will need to add some code to cycle through all the labels to set them back to blue before changing the new week number label to red.

HTH

Peter Hibbs.

Go to the top of the page
 
Jonny45wakey
post Jul 2 2020, 09:33 AM
Post#6



Posts: 16
Joined: 8-June 20



Thanks Peter, i worked around the lbl issue and used textboxes, worked a treat!

The current week (textbox) is highlighted in red as shown on the image.

BTW do you have any guidance on creating continuous forms as yours are really impressive?

Thanks for your continued support, much appreciated smile.gif

Regards

Jonny

Attached File(s)
Attached File  Gantt3.JPG ( 91.68K )Number of downloads: 4
 
Go to the top of the page
 
Peter Hibbs
post Jul 3 2020, 02:50 AM
Post#7


UtterAccess VIP
Posts: 1,809
Joined: 17-June 10
From: Dorset. UK.


Hi Jonny,

QUOTE
BTW do you have any guidance on creating continuous forms as yours are really impressive?


I haven't published anything like that specifically but there are a number of posts of mine that use Continuous type forms in non-standard ways which you could have a look at (although maybe you have already seen some of them).

Outlook Style Calendar. I guess you have seen this one but I have included it anyway, just in case.

Continuous Type form with different colors for each row,

Holiday Planner Demo

Using a Continuous type form in place of a List Box control.

Color Coding groups of records.

Hiding Check Boxes on a Continuous type form (Post #7)

How to display a large tick box on a Continuous type form (Post #7).

Maybe these will help in your projects and good luck.

Peter.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    14th July 2020 - 07:06 AM