Code to change label colour

I want a label control of a tickbox on a form to change colour if it is 
checked, assuming the checked value is YES. I've tried this code but it 
doesn't work

Private Sub txtwithdrawn_AfterUpdate()
If Me.txtwithdrawn Is Yes Then
Me.txtwithdrawn_Label.ForeColor = 255
End If
End Sub

Can anyone help me here.
Thanks
Tony


0
Tony
1/29/2008 2:13:59 PM
access.formscoding 7493 articles. 0 followers. Follow

1 Replies
2587 Views

Similar Articles

[PageSpeed] 39

Sorry for posting too swiftly, realised that checked value should be = True 
and it worked.
Thanks
Tony

"Tony Williams" <tw@invalid.com> wrote in message 
news:eKob1EoYIHA.220@TK2MSFTNGP04.phx.gbl...
>I want a label control of a tickbox on a form to change colour if it is 
>checked, assuming the checked value is YES. I've tried this code but it 
>doesn't work
>
> Private Sub txtwithdrawn_AfterUpdate()
> If Me.txtwithdrawn Is Yes Then
> Me.txtwithdrawn_Label.ForeColor = 255
> End If
> End Sub
>
> Can anyone help me here.
> Thanks
> Tony
>
> 


0
Tony
1/29/2008 2:23:35 PM
Reply:

Similar Artilces:

Integrate Paycodes, benefit codes and deduction codes
Has anyone used integration manager to update new pay rates, deduction amounts and benefit amounts for employees? At the beginning of each year, our company gives pay increases and we need to update the pay codes, deduction codes and benefit codes for 40 employees, which we get the information from a spreadsheet. I thought that maybe I could use integration manager to update the pay, benefit and deduction codes instead of going into each employee's card, which is time consuming. Thanks, Laura Integration Manager will allow you to do this. Use the Payroll Master Destination. one ...

Change "From" address
I need to set a user so that the from address for all e-mail that they send (Exchange 2000 & Outlook 2002) is set to another user's e-mail address. When someone receives one of these e-mails (automatically being generated with shipping information) I want the reply address to be set to the default sales e-mail address (sales@...). The sales@... address is setup as a distribution list that is then forwarded to the sales manager. That is an annoyance with Outlook/Exchange and MAPI profiles. http://www.ivasoft.biz/choosefrom.shtml "Phil" <Phil@discussions.microsoft...

folder colour selection capability
I would like to be able to change the colour on a folder that wasy you could know if the information in the folder needed to inputted or it was complete. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgb...

zip codes don't merge #2
I am trying to mail merge w/ Word 2000 the names and addresses in my worksheet. When I get to the part to choose the format for the mailing labels, I choose F1, F2, etc. to F6 (which is the zip code column). A few do get there, but the vast majority stop at the state, leaving off the entire zip code. I have gone to menu/format and selected text in the number tab. I have gone to format/cells and chosen special/zip code in the number tab. I've read Excel for Dummies. Please help me. TIA bb ...

concatenating two vendor codes
My company recently changed the vendor codes and now I end up with two separate sets of data for each vendor. Obviously I could just leave the vendor code field out. I don't want to do that so what I need to do is concatenate the two codes. Example Vendor Code Vendor Name 123 Joe's Supplies ABC Joe's Supplies what I need is this Vendor Code Vendor Name 123/ABC Joe's Supplies any ideas? Rather than create a new record for each vendor, add another field to the table -- call it NewVendorCode -- and put th...

Can MS EXCEL remove duplicates and separate by color coded items ?
Can MS EXCEL remove duplicates and separate by color coded items ? I am NOT technical and have just started using MS EXCEL. Can anyone PLEASE HELP me: 1. How can I automatically remove duplicates using EXCEL ? ie the same info input more than once on different lines. Can EXCEL do this ? 2, I have color coded the text in the certain lines in terms of priority. can Excel rearrange the data by color ? If yes, How do I do it ? I think I have EXCEL '97 Thanks for your help in advance. Hi 1. You can extract the unique items to a new list using menu Data > Filter > Advanced fil...

Changing a FOLDER to a Calander In Outlook
I am not sure how I did this, but one of my folders now had the calander icon and all of my emails are in a calander entry. How can I change my Folder back to a Folder? I looked in Properties and did not see anything useful. -- Lizette Koehler I am using Outlook 2007. In a regular folder view I do not see my folder. When I use the ARCHIVE function I can see it in the list but as a calendar entry. I then go to the CALENDAR tab and see that it is in the list of calendars. -- Lizette Koehler "Diane Poremsky [MVP]" wrote: > You mean the emails are in a calendar grid?...

16 bit code
Hello, I have a 16 bit code to maintain. (It is too complex to copile it to 32 bit) so all we are doing is support. Now they want to add a small feature, where I need to copy long file names in the project. I know we can not do long file name copies in vc++ (1.52). So I wrote a program in VC++(6.0) which does directory copy. My questions are 1. How can I call a 32 bit exe (I guess WinExec should work)? 2. How can I make the 16 bit to wait till the 32 bit code completes? 3. Is there any other better way to do this? (other than converting to 32 bit) Thanks. I actually do this in an old 16-bi...

area codes is auto filling my own 9 digit ph# vs just area code
When I enter a phone number for a contact it autofills with my personal area code and phone number instead of just the area code. How to I change this to just autofil the area code? I am using Outlook 2007 on an ACER laptop. Make sure you have your area code entered correctly in "Dialing Properties". "Computer Dummy" wrote: > When I enter a phone number for a contact it autofills with my personal area > code and phone number instead of just the area code. How to I change this to > just autofil the area code? I am using Outlook 2007 on an ACER ...

Non Delivery Reports- where do I change the FROM address.
Currently, all our NDRs have a FROM address which is the previous sys admin's name. But where do I change this so that NDR's FROM address is my name? So if I send an email to Jeff, who is not in the Active Directory, I get a NDR from JoeBlow who used to work here years ago.. Exchange 2003 -- | +-- JDMils | Does joeblow's account still exist? If so check his SMTP addresses and see if he has the postmaster address listed as a secondary address. If so remove it and add it to your account. James Chong MCSE + Messaging, MCTP msexchangetips.blogspot.com JDMils wrote: > C...

VBA Code for Pasting Sheets
I would like a spreadhseet that pastes the contents of one sheet into another sheet. I like like to do this for 7 different sheets For example: I would like paste the contents form sheet titled "sheet1" into a sheet titled "data1". Continue to process for pasting "sheet2" into "data2" and "sheet3" into "data3" all way until "sheet7" and "data7". thanks, Curt Subject: Automated Copy Paste Subject: Copy/Paste Import/Export Data VBA Code On Apr 27, 10:49=A0am, Curt <C...@discussions.mi...

Money 2004 - Experian Offer
I just loaded Money 2004 Deluxe and converted my 2003 files with no problem. I decided to give the free year of credit monitoring from Experian a try but after filling everything out I get an error that the provided code has expired. I neither had nor provided any code for this offer, I only used the link from Money 2004. Now Experian was more than willing to set up a $79 account if I wanted to proceed. Any solution out there? I have the same problem... I am looking for a FREE way to contact Microsoft about this problem. >-----Original Message----- >I just loaded Money 2004 ...

Can you change a horizontal bar chart to start at the right
I want to change a horizontal bar graph to start on the right and go left instead of the traditional left to right. Can this be done? If so, how? Format horizontal axis; Axis Options : check box of fifth item down "Values in reverse Order" best wishes -- Bernard Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme "TJW" <TJW@discussions.microsoft.com> wrote in message news:6C38304D-E8A1-48DF-92C2-5492226F841F@microsoft.com... > I want to change a horizontal bar graph to start on the right and go left > instead of the traditional left t...

Change Database Name
How can I change the name that appears at the very top left of the screen in Access 2003. It is not the file name or the name in File, Properties, Titile. Where does it come from? Try tools->startup you see an entry called Application title... -- Albert D. Kallal (Access MVP) Edmonton, Alberta Canada pleaseNOOSpamKallal@msn.com Thanks Albert. That did it. "Albert D. Kallal" wrote: > Try > > tools->startup > > you see an entry called Application title... > > > -- > Albert D. Kallal (Access MVP) > Edmonton, Alberta Canada ...

MC/VISA joint code
Isn't there any way to combine the blocks (4* & 5*) for MC/VISA credit cards? It's a pain to have them separate because my bank posts them together. It is the same company afterall. It would save me a lot of time adding separate entries together to reconcile the statement! I do not know of a way to do what you are asking, but I have found that using the # symbol as follows works better than using the * symbol: 4############### 5############### If you use the * symbol it is a wild card with no determined length. The # symbol requires that the characters after the first d...

Analytical Accounting
Hi, One of my Client's is considering to go down AA path with approx 300,000 AA dimension codes. I would like to hear whether such data set is manageable from Query wizard etc. appreciate your thoughts. Good Morning PR, I found that the issue isn't the number of AA Trx Dim Codes it is the size of the AAG30000 and AAG40000 tables the more entries the longer it takes to product the report. I had one client that started having a cached SSRS report with AA information as a management level report and a different SSRS report with a more restrictive dataset for reporting ...

Change case for all text in cell range
I'm trying to change all the names in existing cells (in a contiguous range) from standard case to all upper case (e.g: A1 = Joe Smith, A2 = Jane Doe, etc. to: A1 = JOE SMITH, A2 = JANE DOE, etc.). I need the new upper case values to be in the original cells. Using "=UPPER(A1:BB82) forces the values in that range to change but the new upper case values are in a different cell range. Any ideas? Thanks in advance. RLL ~ 1/27/2004 Borrowing code from Dave Peterson on truncating Left, this will make everything in A1:BB86 uppercase. Sub UCaseMe() Application.ScreenUpdating = False D...

Change code with code?
Hi All..... I've got 31 Excel .xlsm files to modify the "Change Event" macro in. Is it possible to open and perform this with code, or must I do each one by hand? TIA Vaya con Dios, Chuck, CABGx3 If it is the same change in each sheet, it would probably be just as easy to go into the VBE, double click on the first sheet, make the correction, then copy that correction and double click the second sheet, delete and paste. Repeat the process 30 times. Takes less time than writing the code to do it. "CLR" <CLR@discussions.microsoft.com> wr...

Font changes automically to AlternateGothic2 BT
I hv already set the default font to "Arial Unicode MS" in "Tools" => "Options", but whenever i type, the font will switch to "AlternateGothic2 BT" automically. I even select the whole worksheet to change the font, but then when i type again, it will still change to "AlternateGothic2 BT". Does anyone know why ??? ...

excel merge to create labels in word
i am attempting to merge a spreadsheet to create labels in word (i have been able to do this before) i browse for the excel spreadsheet in word and i am told the data source can not be open. any ideas of how/why i can't seem to merge this file any longer? =?Utf-8?B?c3BsYXNo?= <splash@discussions.microsoft.com> wrote in news:648BE74D-6B45-44F7-8AAC-1DA51823B93F@microsoft.com: > i am attempting to merge a spreadsheet to create labels in word (i > have been able to do this before) i browse for the excel spreadsheet > in word and i am told the data source can not be ope...

Access 2003
I have a form that goes to a subform for searching. It works perfectly on my computer; however, when another user opens it and attempts to perform a search, they receive the Error Code 2455 message. When I debug, it gets stuck on "Me.book_subform.Form.Filter = strWhereSearch" and says that book_subform cannot be found. It isn't a rights issue, it isn't a mapping issue. What am I missing? check your naming. This is an issue that often confused. In this syntax: Me.book_subform.Form.Filter > = strWhereSearch book_subform is the name of the subform control on the main ...

Write a code by code
How can I write a code from procedure to some Workbook's ThisWorkbook? With procedure1 a make Workbook with a table. I need to write Auto_Close procedure to ThisWorkbook which makes some controls before I close it. Is it possible? <jenista.j@discussions.microsoft.com> wrote in message news:0be501c52fab$ba0b6830$a601280a@phx.gbl... > How can I write a code from procedure to some Workbook's > ThisWorkbook? With procedure1 a make Workbook with a table. > I need to write Auto_Close procedure to ThisWorkbook which > makes some controls before I close it. Is it possible? ...

Coding Duplicate Records
How can I code that a record is to be "K" kept or "D" deleted when compared to its next row? Example: A sorted file by Address BEFORE LastName Address Sales Date Keep/Delete 1. WASSEM 0N642 TITUS PL 67,500 6/25/2001 2. HART 0N655 E WEAVER CIR 70,000 3/19/2001 3. HART 0N655 E WEAVER CIR 40,000 3/19/2001 4. HART 0N655 WEAVER CIRCLE 33,700 6/19/1998 5. POYTH 0N662 W WEAVER CIR 294,690 6/21/2000 6. BLAND 0N670 GREEN PL ...

cancel a combobox change
Hello. I want to be able to cancel a combobox change. Cancel is not parameter in the change event, and there is not a beforechange event. I have pasted my attempt below. No matter what item is selected in the event for the combobox, it always changes back to whatever the user selected at the conclusion of the event. Is there a work around that would effectivly be the same as canceling the change? Private Sub ComboBox1_Change() Dim RUSure As Integer, GoBack As Integer GoBack = ComboBox1.ListIndex 'set the goback value in case user wants to cancel. If SavedList = Fals...

help with/for pivottable code
Hi everyone! I have code that takes a large workbook and divides it into a number of separate new workbooks based on data that is in column A. What i need is to create code that will create a pivot table in the new workbook. here is my code: Sub Regionalize() Dim wks As Worksheet Dim wksNew As Worksheet Dim wbk As Workbook Dim rng As Range Dim cell As Range Dim lRow As Long Dim sFileName As String Dim sFolder As String Dim sRegion As String Set wks = Sheets("region") Set rng = wks.Range("regiondata") ...