On a form I have a combo box - let's call it cmboSickness. it has two options "flu" and "malaria". On the same form I have two command buttons - one ehich opens a malaria form and one which opens a flu form. If I select flu then I want the words on the flu command button to change to red. How do I do this and where do I put the code?
I have tried -
If me.cmbosickness=flu then
cmdflu.color=255
Is it possible to use two color fonts on one label? I want to bring attention to the user that by clicking a certain button they can perform a search by "Name" and by clicking on the other button, they can perform a search by "Appointment".
I have a switchboard type form with some buttons. The two buttons in question are labeled, "Search for Appts by Name" and "Search for Appts by Appointment". I want to keep the "Search for" section of the button in black font, but change the "by Appointment" and "by Name" to red font.
I did some searching on changing the color of a font if you change the data. I found a few posts but they really don't fit the need.
I am using a continuous form (which makes this even more difficult) and when someone changes data in a field I want that forecolor to change from black to red.
Is there an easy way (I know not everything is easy) :) in the conditional formatting to create an event? I am thinking not but thought I would ask.
My GUESS is that I need some sort of temp table to verify the data against then return with the forecolor change.
I believe thats the proper word for it. Attached is a screenshot of a section of the database that I have started working on. It is to track placement for a college. Its my first ever and I am fairly good at making things look good, but as far as function - I am terrible.
I can change the raised box that the tab control sits on to a dark maroon when someone has a felony (so it notifies the user of this status)
Private Sub Form_Current() If [Felony] = True Then Felonybox.BackStyle = 1 Felonybox.BackColor = RGB(159, 19, 44) Else Felonybox.BackStyle = 1 Felonybox.BackColor = RGB(208, 207, 202) End If
End Sub
I also have this done on After_Update.
I am trying to change the font on the Tab Control to Red when this occurs as well (only change the 'Criminal History CONFIDENTIAL' to red). I can not find this option anywhere, is this something that has been done or CAN be done?
I created a form that has about 200 fields and all the fields are utilized at a point depending on the work order assigned to us. I wanted to know if it's possible to put like a toggle box or a check box etc. next to the field so if it is checked it would be in a Dark color and the ones not utilized are in a shade of gray. All the fields are coming from the same table. Another thing it's an estimate worksheet so a row would have something like, Labor, QTY, HRs, Overtime, total as columns, so I would want a check box to have control over those but one for each row, EX contractor, locksmith.
All I want to do is change the font color and weight of a couple of columns in a form. No conditions or change when button is pressed or anything like that. Just be blue and stay blue.
I've tried making it a memo, rich-text field and it didn't work.
It works fine in the "member details" form, but not the "member list" form.
i have a report which i need to make certain results displayed in Red, if there is a check in the box.
example:
my report is called OEEModel on the form i have a chkbox - called "FailureModeInPlace" i also have 2 text boxes called "EventCode" and "CodeDescription"
what i want to do is for each record that is displayed with a chkbox ticked that the font in the two boxes turn red and bold...
We have a navigation page with 5 tabs and several navigation buttons underneath their respective tabs linking to reports.
In the main part of the navigation page we have 17 search parameters (text boxes and combo boxes)that the user can use to sort through all the reports we have in the different tabs.
What we would like to do is to have the label text to change to "red" if one of the 17 fields are "required", remain "black" if it is included in the report but not a mandatory search parameter, or turn "light grey" if that parameter is not included in that report.
For example:
My search parameters are: people, phone, and cars
If I were looking at a report of people that included addresses, phones, etc...name and phone would be required search parameters. However, even though I can search by car, it is not in this particular report and the label text should be greyed out. (If the actual text box could go inactive that would be even better).
I have read about buttons being turned colors based on a drop down box choice, but I have not been able to find anything about using a navigation tab subform button to make the colors change in the main navigation form.
I am attempting to adjust the font color of a date field on a report based on the value of two other fields. I have the below code set in the "On Format" property of my detail section - however it does not work when I open the report to view.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.Frequency = "Annually" Then If Me.ClassDate < (DateAdd("yyyy", -1, Date)) Then Me.ClassDate.ForeColor = vbRed Me.ClassDate.FontBold End If End If End Sub
My list box will be used to populate a form, is it possible that once the item is dble-clicked, it reverts to a different color to let the user know it has already been selected once or can the row be locked once it has been selected?
I would like to change the Font and background color based on dates.
-I have a text box (Training Event) on a form populated from a field (Training Dates) in a query.
- I need the font and/or the background in that text box to change to red when the date is 12 month past, yellow 11 months past, white 10 months past and green for 9 months past.
I would like to be able to change font color and appearance while entering data into a form (example: italicize a word). Is there any way to activate the font format while in a form?
In access report, I'm trying to change color of text in specific records based on the true/false value in another record. Works in forms using conditional formatting, but won't seem to work in a report.
Here's what works in forms : IIf([2009 Symposium]=true, forecolor=255 ....this changes the records to red.
But using the same expression in a report doesn't change the text color.
I am currently in the process of creating a pop-up menu to allow my users to do some simple text formatting.I have used the following code to do so:
Code:
Dim cmbShortcutMenu As Office.CommandBar ' Create the new pop-up menu instance Set cmbShortcutMenu = CommandBars.Add("popupFormatMenu", msoBarPopup, False, True) ' Add the bold button
[code]....
The problem is that I now want to add the FontColor picker control and I keep getting an error.I think the problem lies in the type of control I want to add. According to the Microsoft support files I downloaded the fontColor control is of type Gallery and ID = 11949, so the code should look something like this:
I have a Header with basically four rows of Text, all in Calibri. The top row is White text, 14pt, on a Dark Grey Rectangle. The other rows are Supposed to be Calibri, 12pt, Black text on White Rectangles. The issue is that when I am in Design View, it displays properly, But when I go to Layout View, the Black Text changes from Calibri to Garamond. If I look at Design View again, it Displays as Calibri, but even if I go to Layout View, Change the Font, and go to Design View again, the next time I try to Print, it changes to Garamond again. Everything else stays he same, whether the text is 12-14pt, the Color, Bold, Underline, Italic Settings. Only the Font Changes.
I would like to get a third party to edit a database and record those edits by changing the colour of the font. I know this can be done in layout mode, but it changes the font in all records, I only wish to change the font colour in one record, how I can do this, without changing all the records in the database.
I have a report that prints labels (similar to avery labels) which pulls data from a query. These labels are all unique and vary in length. Due to the length variance, I want the font size to get smaller for labels with more characters. I want the text to go down to another line when necessary.
In my report under the OnPage Event Procedure I wrote this:
Private Sub Report_Page() If Len(Text2) > 20 Then Text2.FontSize = 8 If Len(Text2) > 10 And Len(Text2) < 21 Then Text2.FontSize = 10 If Len(Text2) < 11 Then Text2.FontSize = 14 End Sub
This works to some degree but the problem is that once there is a longer label, all of the proceeding labels are resized & the longer label that should have been resized was not.
Is there another place I should be writing this code? I looked under events for the textbox but there doesn't seem to be anything that would work since none of them would trigger when printing labels
i have a text box which displays the current stock level of an item, when the current stock level reaches 1 i need the font to change colour from black to red. for example, if the stock is 2 - font is black if one item is sold the stock will become 1 - font changes to red
how do i go about this? any help is VERY VERY welcomed and muchly appreciated. thanx alot.
I'm trying to make the backround color of a text box "prova" (short date value) changing according to the values of other two different text boxes "StartDate" and "EndDate" (both are short date values). I'd like the backround of prova to be blue if its value is between StartDate value and EndDate value. So in the code builder I made this function:
Private Sub prova_AfterUpdate()
If Me.prova.Value > Me.StartDate.Value & Me.prova.Value < Me.EndDate.Value Then
Me.[prova].BackColor = vbBlue
Else Me.[prova].BackColor = vbWhite End If
End Sub
Is that correct? Thank a slot for your help :confused:
=IIf([Text131] Between 16 And 30,"Unacceptable",IIf([Text131] Between 31 And 42,"Marginal",IIf([Text131] Between 43 And 56,"Effective",IIf([Text131] Between 57 And 71,"Very Good",IIf([Text131] Between 72 And 80,"Outstanding","")))))
It works just fine, but I was wondering if there'd be a way to change the text color of the <<true>> statement based on what it is? i.e. "Outstanding" and "Very Good" would be green, "Effective" could be yellow, "Marginal could be brown and "Unacceptable" could be red. How would I implement that into this expression, if that's even possible? Thanx for your assistance!
Hi. Is that even possible? I have form in datasheet view and text box on it. I need to change color of font in dependency of value of previous record. Maybe some kind of conditional formatting? Can somebody help?
I have a CONTINUOUS form that shows all my records. I want it to change the back color of a field when it is a certain value. so far i get it to change back color when the very first record in the list is a certain value, but then it will change the back color for every value and not just one value.
This is very close to the label question that I also have posted. I am trying to get my report to have the back ground of some text boxes turn yellow if they are populated. I can get them to turn yellow, but they turn yellow whether they are populated or not. I have the code in the Report Open event. Here is some of the code that I have.
If Not IsNull(MMSJob) Then MMSJob.BackColor = 65535 Else MMSJob.BackColor = vbWhite End If
I have a form which uses a query for entry to the table. One of the fields in the query is a calculated field which shows in the form. The calculated field returns a number from 1 to 5. Rather than showing this number I would like to show a round stoplight that changes color for each number. I have inserted a OLE object OLEunbound235 into the form. The colors I want to use are icolor = RGB(255, 204, 0) 'Gold icolor = RGB(192, 192, 192) 'Silver icolor = RGB(216, 129, 0) 'Bronze icolor = RGB(255, 255, 0) 'Yellow icolor = RGB(255, 0, 0) 'Red and icolor = RGB(255, 255, 255) 'White for any other value.
The text box that returns the calculated number is labeled Text1 and I have hidden this box so it can not be seen. Does anyone know how to write this code that would change the OLE object color automatically so when the user enters data into the form and the return number changes the color of the OLE object changes. I know very little about VBA and I am not sure where to begin or where to even write the code.