Microsoft Access Conditional Formatting Examples
I am trying to create a Form using the Datasheet view were it will format each row depending on the value in on of the columns. I could use the Conditional Formatting feature within Access if I only had three types of formatting, unfortuantly I currently have six types. I am a beginner with VBA, but have managed to get some things to work. I have looked at some examples using the FormatConditions.Add but am getting confused.
I have included a snipet of code that I am currently trying. Any good sources of help will be helpfull. Private Sub Form_Load() Dim objCond As FormatConditions Set objCond = Me.Field_3.FormatCondition s.Add(acEx pression,, Me.Field_3.Value = 'Input') Set objCond = Me.Field_3.FormatCondition s.Add(acEx pression,, Me.Field_3.Value = 'UA') Set objCond = Me.Field_3.FormatCondition s.Add(acEx pression,, Me.Field_3.Value = 'Cust Sat') Set objCond = Me.Field_3.FormatCondition s.Add(acEx pression,, Me.Field_3.Value = 'RO') Set objCond = Me.Field_3.FormatCondition s.Add(acEx pression,, Me.Field_3.Value = 'Ops').
I want to use Access 2010 to conditional format a date so that fields on my forms or reports will automatically highlight yellow 3 months before that actual date.
Not on a row-by-row basis. A continuous form is just the same set of controls repeated over and over again. A Kiss Before Dying 1991 Full Movie more. So the format you see would be the conditions returned by the latest 'run' of your fomatting code. I'm not sure what you're trying to do, but you might consider a third-party grid control if you absolutely must have this sort of formatting. They aren't cheap, and they can be difficult to deploy and maintain, but with most professional grid controls you can control formatting on a cell-by-cell basis.
Is there any way to sort or group a report with conditional formatting to keep the two conditions together or to break them into to separate sections by writing an expression or something? I have a report with one column that is grouped, sorted, and summed using Group and Sort. Then I used conditional formatting on a calculated control to show a condition of red with totals that are summed as less than or equal to 14 and the other conditional formatting as to show a condition of green with totals summed as greater than or equal to 15. If there is a way to do this, can someone write an example expression and let me know if I can add the expression to the control source's builder.
I'd suggest you return a computed column in the report's query which uses a combination of the IIF and DSUM functions to return a 0 or 1 on the basis of the sum of the group of rows of which each row is a member being less than 15 or not. You'd then be able to group by this column in the report to return each subset of rows separately in the report. Put this group above that on which the values are currently summed. _____________________ Ken Sheridan, Stafford, England 'Don't write it down until you understand it!' - Richard Feynman. It's a bit difficult to understand your question without context and real life examples.
However, let's assume the individual records are scores from 1 to 10 by person and event. Assuming you want to total all the scores and use the resulting sum of scores to set some formatting. I would create a totals query that groups by person and sums the scores. Then add this totals query to your report's record source and join the 'person' fields.
You then have the [sum of scores] in the report's record source. Duane Hookom Minnesota.