I have a report with a list of employee names (and other information). A handful of them need to be a different color (other than default). There will always be more than 3, so I can't use the conditional formatting tool.
I am trying to place some code in the "expression is" section of conditional formatting. Need some help converting from code to conditional formatting format.
I have set up a check box "Check83" next to a standard control box "Title(O)". Below is the code I am currently using. This code is in the after update section of the check box, and in the oncurrent section of the form.
This code turns the box blue when I click the check box.
Private Sub Check83_AfterUpdate() If Me.Check83 Then Me.[Title(O)].BackColor = vbBlue Else Me.[Title(O)].BackColor = vbWhite End If End Sub
My form has 46 records and all have check boxes linked to the control box with the code above. When the box is blue in record 1, I don't want there to be a blue box in record 2. Can't figure out how to do this. Tried to do in with code, but failed. Thought it may be possible using conditional formatting.
Because they are more efficient, I am using hyperlinks to connect my forms. I want to be able to deactivate hyperlinks based on criteria that are selected.
I have a continuous form in Access 2003 listing products for return for a customers. I am in the process of creating a completion form which will just have the product number, model number and then a command button called complete.
What I'm doing is have it so when the person clicks the button it adds a value to a field saying Complete. OK. But, what I then want it to do is for any record thats associated with this customer where the field = complete to have the command button gray out.
Is this possible? I know I can conditional format a text box to do this but can't see a way to do it with a command button? Any ideas?
I have though of layering a transparent button and having a textbox behind this with complete in and having this change colour but not sure if thats the best way?
Could some kind person out there help me out please? I have been 'dabbling in' the area of "conditional formatting", particularly in the area of changing the colour of my active form based on the result of whats input on a text box. I have had some success in this area but where I am getting confused is getting the colour of my form to change on the basis of what is entered into a text box control that does not match exactly. My form background changes to the required colour when its value is 'set exactly' or matches, but what I am trying to achieve is to change it according to the first letter of entry regardless of what follows thereafter? It always starts with a letter, either a ‘D’ or ‘V’ to indicate whether its ‘Vital’ or ‘Desirable’ and is subsequently followed by no more than 6 numbers and finally a letter. Basically I need my form to change colour based on the whether it is either a ‘V’ or a ‘D’ irrespective of what follows???
What I have been using so far is:
Private Sub Model_Number_AfterUpdate() If Me.Part_Number = "V111145K" Then Me.Section(acDetail).BackColor = 12632256 'Light Red Else Me.Section(acDetail).BackColor = 8421631 'Blah Gray End If End Sub
Private Sub Form_Current() If Me.Part_Number = "V111145K" Then Me.Section(acDetail).BackColor = 12632256 'Light Red Else Me.Section(acDetail).BackColor = 8421631 'Blah Gray End If End Sub
Your help would be gratefully appreciated:confused:
btw, although values will always be in order they may not all be output, so it's not just case of odd, even, odd, even (that would be too easy!)
I can retrieve the Previous Record's GroupNo value (via a function) in another text box and compare current GroupNoID with this in the Format Expressions and manage to change the colour, but it won't sustain this new colour for the subsequent same GroupNos, obviously as the values have changed.
So how can I....
Change the colour when the value changes. Keep this new colour until it the value changes (increases) again.
I'd lile to show/hide selected subforms based on the the text in a txtfield. The text in the selection field (txtSelect) I'd like to use for that may be either one of the following:
book-01, book-02, book-03 etc OR, folder-01, folder-02, folder-03 etc OR, record-01, record-02 record-03 etc. OR it can be just a 4 digit number.
If the txtSelect contains "book" I'd like the subfrmBookdetails to be visible. If the txtSelect contains "folder" obviously the subfrmFolderdetails etc.
What I'm struggling with is the If-Then statement for selecting the partial text in txtselect.
I've tried things like this: On current me.txtSelect.setfocus if me.txtSelect.text="book*" then me.subfrmBookdetails.visible=true etc etc.
No joy.
I know how to get this to work in a query with a like-statement but I have not been able to find anything on this in relation to conditional formatting of a form. Any one and good ideas?
In my report I have date fields that span over 5 years with different pull dates ex. 3, 6, 9,12,24,36,48 and 60 months. I have successfully formatted these fields using the conditional format by: Expression Is Date()<[9 Month] and Date()>[6 Month] for the 9 month field and so forth for each field. This has allowed me to highlight the field that is the next upcomming date. One report I have this works fine for, very simple report. In a more complicated report, I have moved the fields together and have highlighted every other row to segregate them this formatting does not work. It will highlight the field, but it will pull in earlier dates, from 2004. Is there another way to format the fields with conditions other than the condition format? Possible to do it in code similar to highlighting every other line? The example I followed was here: http://support.microsoft.com/kb/q210392
I will be out and about for a couple of days, but will return any replys to questions when I get back.
I am creating a report based off a query. My problem is that I am trying to create conditional statements within a unbounded text box. I would like to say: =[Field] where [Field2] = X. Unfortunately, I can not find any support on this matter.
however conditional formatting is simply not working. I have two fields on a report, the report is based on a query, and the two fields are called "ExpectedCost" and "ActualCost". I want "ActualCost" to turn red if and when it is greater than "ExpectedCost". I clicked on "ActualCost" and then clicked on "Conditional Formatting". I selected "Expression" and then put the following expression in the space available: [ActualCost]>[ExpectedCost]
The syntax seems to be correct; however it just isn't working.
I have a field on a report that I was able to make bold using conditional formatting. I want to make the other fields in the row bold as well if the value of the 1st field equals a set value.
I put conditional formatting on the Contractor field
EX: Field Value Is equal to "Estimations"
I was Bid Amount, Sq Footage, =[bid amount]/[sq footage] and =[bid amount]/[estimate] fields to also be bold if the Contractor field is equal to Estimations.
I wish to use the conditional formatting that if the date required has passed the current date - i wish for everything for that record be turned red when searched or printed.
ive managed to make the Date Reqd turn red but i dont know how i will make the other cells follow the conditional formatting from another cell?
My other Cells i wish to change to red from the Date Reqd are - Customer Code, Site, Plot No, Product
I am making a planner in the access 2010 report. I am showing which activity finished when but I also want to highlight/ shade the cell to the corresponding month on the planner to the right. See picture above. I tried conditional formatting with date rage 1/1/2014 and 31/1/2014 but it does not gives me accurate result.
I've got a word mail merge document that is formatted exactly how I want it. I'm using an Access 2003 database to populate the word 2003 mail merge document.What I would like is to use a access report rather than a mail merge but correctly formatting everything is going to take me forever.
Is there any way I can use the word document I already have to enforce the formatting or must I spend hours positioning each line of text by eye and guessing where on my report it must go to match the word doc?
I have a report where I read the value of a field in my query (a boolean) field, and if the value is true, I display two lines on my report, hide the lines if the value is false. Here's the code:
Private Sub Report_Page() If Me.Flagged.Value = True Then Me.Line102.Visible = True Me.Line95.Visible = True Else Me.Line102.Visible = False Me.Line95.Visible = False End If End Sub
This code works great.... except on the first page of the report! If I run the report in break mode, I can see that it evaluates my condition as "False" on the first record, regardless of the actual value in the field.
My report is based on a query that has some conditions in it, but, everything works correctly - except page 1.
I'm using Access 2010. I set up conditional formatting in some areas of my report. They're very simple like if a cell is between 0 and .4, then the background color of the field is red. They work just fine...when I click on the field. I don't remember ever running into this issue in the past. I've been reading potential solutions on the web, but haven't found a way to make the conditional formatting rules kick in when the report is loaded.
In my Access 2010 report, I am attempting to perform conditional formatting of one field based on the difference between two fields. In particular, one field is "Time Scheduled" and the other field is "Time In". If the "Time In" is equal to or greater than 60 minutes of "Time Scheduled", I would like to format it to be red font. If it is less, I would like to format it to be green font.how I can conditionally format to do this?
I am trying to add conditional formatting to a several fields in a report. So far i can use the contional formatting to set a field called [colour] to set that field to red and bold. But i believe I need to use an Expression for all fields, so I can make all fields that = red go red. I have used the the expression:
I have master and child fields in my query, and in my report I have blank controls where there is no child record to the master. I'm trying to set the section (Group Header and Detail) to be invisible when there's no value in a control.
However, as soon as I introduce an If statement to the VBA in a report, regardless of the event I put it in, it just stops working completely.