Change BackColor Code Not Working - HELP!

I have a major request for the Dept of Justice.  I have a report that looks 
like this:

Task Type     4/5/2010      4/12/2010     4/19/2010
DSR               St. Louis        St. Louis
Exch RU        Seatttle         
Exch RU        Memphis        Memphis          Memphis

What I need is code that will work.  Basically if Task Type = DSR then the 
background color of St. Louis and all other sites with "DSR" attached to it 
should be Red.  If the Task Type is Exch RU then it'll be Blue, etc.  

Please respond quickly.

Thanks

0
Utf
12/8/2009 7:56:02 PM
access.reports 4434 articles. 0 followers. Follow

2 Replies
1487 Views

Similar Articles

[PageSpeed] 24

Your report looks good from here. I am not aware of any issues with the 
colors. "Code Not Working" doesn't help us. 

Are you using Conditional Formatting? What are your results? If you are 
truly using code, then you should share the code.

-- 
Duane Hookom
Microsoft Access MVP


"Ben" wrote:

> I have a major request for the Dept of Justice.  I have a report that looks 
> like this:
> 
> Task Type     4/5/2010      4/12/2010     4/19/2010
> DSR               St. Louis        St. Louis
> Exch RU        Seatttle         
> Exch RU        Memphis        Memphis          Memphis
> 
> What I need is code that will work.  Basically if Task Type = DSR then the 
> background color of St. Louis and all other sites with "DSR" attached to it 
> should be Red.  If the Task Type is Exch RU then it'll be Blue, etc.  
> 
> Please respond quickly.
> 
> Thanks
> 
0
Utf
12/8/2009 8:19:03 PM
Ben wrote:

>I have a major request for the Dept of Justice.  I have a report that looks 
>like this:
>
>Task Type     4/5/2010      4/12/2010     4/19/2010
>DSR               St. Louis        St. Louis
>Exch RU        Seatttle         
>Exch RU        Memphis        Memphis          Memphis
>
>What I need is code that will work.  Basically if Task Type = DSR then the 
>background color of St. Louis and all other sites with "DSR" attached to it 
>should be Red.  If the Task Type is Exch RU then it'll be Blue, etc.


You can use some code in the Format (or Print) event to do
that:

Select Case Me.[Task Type]
Case "DSR"
	Me.Section(0).BackColor = vbRed
Case "Exch RU"
	Me.Section(0).BackColor = vbBlue
Case ?
	 . . .
Case Else
	MsgBox "Unknown task type"
End Select

You will probably want to make each of the text box's
BackStyle property to Transparent.

At some point, you will probably have to change a color or
even add a new task type so it might be worth investing some
time to remove the code's dependency on the task type.  That
would be done by adding a color code field to the table that
defines the available task types.

-- 
Marsh
MVP [MS Access]
0
Marshall
12/8/2009 9:18:59 PM
Reply:

Similar Artilces:

outlook express Spell check not working
I installed MS-office 7.0 on my XP and the icon for the e- mail spell checker came on but the still does not work. I get an error message. Whats up now??? I was told all I needed was office and it would work!! This newsgroup is for support of Outlook 97-2003 from the Office family for Windows PCs. For Outlook Express (OE) support try posting in one of these newsgroups: microsoft.public.inetexplorer.ie4.outlookexpress for OE 4.x microsoft.public.windows.inetexplorer.ie5.outlookexpress for OE 5.x http://support.microsoft.com/newsgroups/default.aspx?ICP=GSS3&NewsGroup=microsoft.public....

External data link change
Hi, I've a sheet linked to an external data on the net, and I would like that a cell in this sheet to indicate the last date and time it was updated, the simplest way the better but I can do some programming too. Thanks for your attention, -- Domingos Junqueira No need of help any more, I solved the question. Thanks again ...

Why does the change change to a number?
Hi all, I've noticed something wierd and always wondered WHY it happens. When you type a date into a cell, and then change the Formatting of it to a 'general' cell, it turns into a number. How does it come up with that number? What is the significance? i.e. type today's date of "12/7/2007" - change it to a 'General' format, and it then says "39423". I'm a trainer of Excel and this question always comes up. I'm curious myself too. Thanks! Joe It's the number of days since January zero 1900 using Excel default for windows (M...

changing the way Excel displays selected cells
Is there a way to change the way Excel displays selected cells? I'm interested in viewing all the selected cells highlighted (with light blue for instance), but by default excel highlights all the cells but not the first one the same occurs when you define a range with no adyacents cells Your definition of the display is not quite correct. Excel highlights the current cell, Excel also highlights a selecte range. The currently selected cell is generally the first of a range, bu press enter and the current cell changes and becomes the second, the third etc in the range. You cannot...

DST changes for Exchange 5.5
I noticed the 2007 DST Calendar Update "Exchange tool" is available now: http://support.microsoft.com/kb/930879 This will seemingly take care of calendars for mailboxes still on Exchange 5.5 servers, as Exchange 5.5 is listed as "compatible" . However would this address the CDO issues such as BlackBerry users and OWA users still on Exchange 5.5 ? Thanks in advance, Itrcb4 On Mon, 12 Feb 2007 14:31:00 -0800, itrcb4 <itrcb4@discussions.microsoft.com> wrote: >I noticed the 2007 DST Calendar Update "Exchange tool" is available now: > >http://su...

Track Changes
How do i remove the track changes in outlook? When i press "Enter", a symbol that represents "Enter" will appears. Same for space etc. ...

Why can I suddenly not see toolbar options when I'm working on a d
Suddenly when I'm working on a document I have to click on "home" or "view" or "review" etc. EACH TIME I want to use a feature like bullet or indent paragraph etc. Until today when I clicked on "home" all the home tools stayed visible at the top of the document until I moved to "view" or "review" etc. Now as soon as I type on my document, the "home" (or whatever) tools disappear and I have to click "home" (or whatever) each time to see them. How did this happen and how do I fix it??? You have &...

aarow keys don't work
I'm not sure why, but suddenly, my aarow keys do not work any more. Well, they don't do what I want them to, at least. I know I have run into this problem before at work, but I didn't see how the issue was fixed. But, I do know, there is a way to fix it. Right now, when I hit an aarow key, it moves the page instead of changing which cell is highlighted. How do I change them back to normal? Thanks. n i k i Scroll lock key hit by mistake? -- No private emails please, for everyone's benefit keep the discussion in the newsgroup. Regards, Peo Sjoblom "niki" ...

Transaction level posting not working
I have a problem with one of my clients that I haven't run in to before. They are running Dynamics 6.0 ctree. They have 10 companies set up. In one of their companies the transaction level posting is not working in A/P. They often enter an A/P trx and print a check for it on the fly. Their usual procedure is to post the transaction through transaction level posting. In the company in question, when the Post button is clicked nothing happens. No error msg, nothing. The trx level posting works in all of their other companies. I've checked posting settings, cleared out all...

more on VBA function name change
I thought I'd start a new thread since I haven't received any replies to my first one... To recap: I've declared a function in a module using mixed case: Function TMDE_Category (FormName As Form) I noticed recently that it appeared in the module as Function tmde_category(FormName As Form) I changed it back to the mixed case declaration, saved the module, exited the app, reopened it and looked. The function had changed back to the all lowercase declaration. Things I've tried since the original post: Using the databse documenter, I selected all ob...

Can't Publish changes with Deploy Manager
After a migration process, I can't publish the changes made on CRM. When I try do this in Deploy Manager I get the follow error: ---------------------------------------------------------------------------- ----- Publish done with errors. See the event log to get deitails NETRA-INOVACAO: ***Error*** Failed to download XSL template files from Web Server ---------------------------------------------------------------------------- ----- Can somebody help me? I don't know if the migration process have any relationship with the error. Thank you for pay attention. []'s Vin�cius Pitta...

Filter contact records by customer type code in views
In version 1.2 I had set up several views of contact records by customer type code. In 3.0 this field cannot be selected as filtering criteria. While the views I had set up in 1.2 work, that cannot be changed. Is there a reason this field is no longer avialable under 3.0? This field is listed attribute. Is there a way to may it appear? Thanks for any help you can give. Brand Microsoft CRM Support maybe of help with this one, try submiting a incident for this. Good luck. Frank Lee Workopia, Inc. www.workopia.com "Brand" wrote: > In version 1.2 I had set up several v...

How to change icon for my application
Hi, I am currently developing an application on visual studio 6.0, and i wish to change the MFC icon on my application header. Anyone can help? Thank you. Raed Sawalha wrote: > Hi, I am currently developing an application on visual studio 6.0, and i > wish to change the MFC icon on my application header. Anyone can help? Thank > you. > > Open the icon resource for editing by double clicking. Then notice the control just above the editing grid that lets you switch between editing the large icon and editing the small one. -- Scott McPhillips [VC++ MVP] thanx that work...

How to change newsgroup message font
Like many other ribbon based programs I sometimes struggle to find how to make a change. This time its how to change the font just for newsgroup messages? regards "nobody" wrote in message news:EWTao.39493$GF5.7129@hurricane... > Like many other ribbon based programs I sometimes struggle to find how to make a change. This time its how to change the font just for newsgroup messages? Newsgroup messages are usually plain text. The font used is that selected at [no name tab] > Options > Mail > Read > Fonts for the encoding specified for the messag...

Notify change of email address when changing ISP
How do I notify my entire address book of an email address when I change ISP's? Thanks By sending a mail to everyone ? If you do so, please use BCC for the adresses, this way you won't spread everybody's e-mail adres to everybody. Niels Bob Baker wrote: > How do I notify my entire address book of an email address when I change ISP's? > Thanks ...

Office stopped working after the auto-update a few months ago
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Microsoft Office stopped working after it ran an auto-update a few months ago. Now, when I open any of the Office apps, I get an error message like this: &quot;Check with the developer to make sure Microsoft Word works with this version of Mac OS X. You may need to reinstall the application. Be sure to install any available updates for the application and Mac OS X.&quot; <br><br>There are no available updates for Mac OS X or Office that I am aware of�when I run the Software Update it doesn&#...

Change a formula to an acual number
I want to change the formula I have created to the number it has created Example: Cell A1 is the number 1. Cell A2 is the formula =a1+1 creatin the number 2. I want this to be a two not a formula. Any ideas? Laura, copy, then paste special, valves -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 97 ** remove news from my email address to reply by email ** "Laura" <anonymous@discussions.microsoft.com> wrote in message news...

Problem Changing an Investment Name
I am trying to change an investment name and Money 2006 tells me "The name or symbol 'TRP Spectrum Income' has already been used for a deleted investment. Please enter a different name." When I go to delete investments the name does not appear! Any ideas on how I get Money to accept the name change? This is the first time I have run into this situation and I have made numerous name changes in Money over the years. In microsoft.public.money, Ken wrote: >I am trying to change an investment name and Money 2006 tells me "The name >or symbol 'TRP Spec...

Should I change this code?
Should I change 556 to 560???..............Thanks for your help..........Bob Private Sub Command560_Click() On Error GoTo Err_Command556_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "frmClientInfomation" DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_Command556_Click: Exit Sub Err_Command556_Click: MsgBox Err.Description Resume Exit_Command556_Click End Sub On Sun, 15 Jul 2007 16:37:26 +1200, "Bob V" <rjvance@ihug.co.nz> wrote: > >Should I change 556 to 560???..............Thanks for your help.....

symbols won't work in form fields
I have Access 2002. We write a lot of letters in French and as I have a QWERTY keyboard, we have shortcuts for the french letters which are missing from the keyboard. For example Ctrl + e is e with an accute accent, Alt + e is e with a grave accent, and so on. It all works just fine in WORD. But in my forms in my ACCESS database, in my fill-in fields, the shortcuts simply don't work. And there is no "symbol" option available in the tool bar to insert a symbol or French character. Is there any way I can add this function in to the database ? thanks .. Roger ...

How to change default font in Outlook 2003
Can someone tell me how to change tthe default font in Outlook 2003 when composing a new email. It always comes up as Times New Roman. I remember somewhere that I specified that Outlook should use Word as the text editor and that seems to be the case. I have Arial as my default font in Word but this seems to make no difference when using Outlook. Hi, Please go to Tools > Setting > Mail Format > Stationery and Fonts > Fonts It's right there :) On 20 Nov 2005 06:28:45 -0800, amarsarit@gmail.com wrote: >Hi, >Please go to Tools > Setting > Mail Format > Statione...

Looking for a proforma that works on excel
I need a service business proforma that works on excel, has anyone seen or done one and know where I can get a copy? -- hamlink4 You'll need to provide a little more information than that. A proforma what? "Hamlink4" <Hamlink4@discussions.microsoft.com> wrote in message news:8D282466-2B05-45E7-9F2E-13C1646B0570@microsoft.com... >I need a service business proforma that works on excel, has anyone seen or > done one and know where I can get a copy? > -- > hamlink4 ...

icon changes with change of extension
when we change the extension of a file in windows, its icon also changes..... how does windows do tht. in my application i require a similar approach. i want the icon to be dependent on the file extension not on the attributes of the file. i have gone trough the registry but things are not very clear. Windows has listed all the file extensions avaliable there, but there is no general way to extract icons for those extension... kindly help icon changes with change of extension "Neelu" <nemesia31@gmail.com> wrote in message news:1161232739.720722.120950@b28g2000cwb.google...

excel 2003 not working when published to remote site
Using Excel 2003. Create a chart and have saved it as a web page and published to a remote share. When I save it locally, it works fine and is interactive,etc.. When I save it remotely and open the htm file in a web browser, it opens like the charting area but the data is not present. Gives error below in the pivot table that appears. Getting error The query could not be processed: o Error opening data file "file://\\remoteserver01\hassan\numbers_files\Numbers_Jan24_12558_cachedata001.xml". Any idea how to fix it ? I want others to access it remotely. Thanks ...

Field Type Change
I am trying to change a free text field to a drop down menu in my current database, that already has data entered for this particular field, in order to avoid multiple versions of the same organization that are just typed in differently. I'm assuming that I'll need to recode the different versions of an entry to make them uniform but after that, I'm unsure how to proceed so I won't lose any data. Is this possible or will I need to delete the field, recreate it as a drop down and then re-enter the data? Thanks in advance! Mike Thanks everyone for all the input and advice s...