Is there way to use conditional formatting (similar to excel) to a text box in an ms access form? The user will enter a number in the text box. If the number is between 0-25 is red, if its from 26-50 its yellow, if its from 51-75 than green and 76-100 blue.
How can this be done in MS Access?
?
Note as #Nexus mentioned below, the FormatConditions collection will only accept 3 conditions. But you were aiming for 4 conditions. Unless you can consolidate those into only 3, you won't be able to use Access' conditional formatting feature for this.
With the form in Design View, right-click the text box and choose "Conditional Formatting ..." from the context menu.
Select "Field Value Is" from the drop-down under Condition 1, "between" in the second drop-down, and enter your start (0) and end (25) range values in the next 2 boxes. Choose red from the Font/Fore Color drop-down.
Click the "Add >>" button to add another condition (Condition 2). Set the values for that condition: 26; 50; and yellow.
Repeat for the remaining conditions.
Here's a screen capture of your first 2 conditions applied to a text box. (I chose light grey for the background color so the foreground colors would be more distinct in format preview area.)
Related
I am trying to conditionally format the progress till date to red for the date in the end date which has already passed or which is lesser than the current date and when the concern filter is yes.
Below is the screen shot:
Please help me how do I Make the progress column red for end dates which have passed or lesser than the current date and when the concern filter is yes
This is one way to color a column based another value (conditional formatting).
Data set looks like following:
Create a calculated field which will hold the color condition (I assume your data is in date format and not string):
IF [Concern] = "Yes" AND [End Date] < TODAY() THEN "RED" ELSE "" END
Create a dummy calculated field:
We create a second dummy:
We add the dummy columns to the "columns" at the top
Make them to "Dual Axis"
Then click on "Marks" and "All". Drag color and drag it down to Color (1 in picture) and choose text (2 in picture)
Then drag the Progress column to the text field
Time to adjust layout. Right click and choose "Edit Axis"
9.1 Remove "Title" from "Axis Titles"
9.2 Remove the ticker marks
Choose the upper header and change the title
and remove the tickers
Then adjust the header space by dragging the line
I would like to ask if someone know how to work around with Sub Total colors.
Currently I want highlight the sub total header only but when I apply the header it also applied to my color header.
First remove the color formatting that is already applied.
Then go to Format, click on Shading(Paint Bucket Icon), then under section Total set the color for Pane and Header.
I want to color the header and footers row(only my data tables not the full section) of a crystal report . Its easy to color the section but i cannot able find a proper way
For this 3 way you achieve.
If both header/footer in different section than data, then go to section, right click on formating, give the color. Check this link
http://www.codeproject.com/Questions/56657/change-back-color-of-crystal-report
http://scn.sap.com/thread/1883125
Drag and drop and spread a crystal report field (like label) into entire length of row's width. Give the color formating by clicking on Right click -> format object -> color. Now your header/footer field which work as a column /summary get front of this above field.
You can give the color to all object and also do not give gap between them.
Step to color the object.
1. Select the items that you want to change, and select select Format, then select Format Text.
2. The Format Editor dialog box appears.
3. Select the Font tab.
4. Select the appropriate font, style, size, and color.
I want to change the color of the text in text object using formula in Crystal Report.
I tried like
If {mnth_ttx.weight}>0 Then
crRed;
But the color is not changing at run time.
I wrote this condition under formula edit of weight text object. But not working.
How to change the color of a text using formula
Follow these steps:
Right click field: select Format Field...
Select Font tab, then click conditional-formula button to the right of the color picker
Enter this formula: If {mnth_ttx.weight}>0 Then crRed Else crBlack
Follow these steps:
Right click field: select Format Field.
select font tab.
click on the X+2 box directly to the right of the color picker. The Formula Editor will open.
Enter this formula:
If {mnth_ttx.weight}>0
Then crRed
Else crBlack
You can use the tried-and-true "currentfieldvalue" evaluation.
Right click on your element and hit "Format Field"
In the Font tab, click on the edit button for "Color".
Enter this:
if currentfieldvalue > 0 then crRed else crBlack
That's all she wrote
You can create a more advanced format using html
First text field need to set the TextFormat property as crHTMLText
With this the text field will interpret the html after being assigned in the formula you can put the following
if {?PARAMETER}=3 then
If not IsNull ({TABLE.FIELD1}) Then
"<p><b><font color='#00559c'>" & {TABLE2.FIELD1} & "</font></b></p>" & {TABLE2.FIELD2} & ": " & {TABLE2.FIELD2}
Else
"<p><b><font color='#00559c'>" & {TABLE2.FIELD1} & "</font></b></p>"
if x> 0 then
formula= color(159,255,159)
else
formula = crRed
end if
'The values in the color(159,255,159) are color(red, green, blue). These are the numbers that you will see when you create a custom color.
Right click field
1. Select format object
2. Goto Border
3. Select Background Colorado
4. Click OK.
That's it. You are done!
I have a row in a tablex that I want to hide based on a condition. I can do this with the visibility property and also using CanShrink as well is an option.
I've tried both of these and the best I can do is hide the row (make it invisible), but it keeps the whitespace it takes up - I need to remove the whitespace too so if it is not shown that it doesn't take up paper/viewing space.
I have also made the height of the row very small and put cangrow=true so that that if i populate the field with data based on an expression it will grow to the right size but this is not ideal because there is still 0.03125in of space for the row that is always shown (minimim height) and if it grows it grows to fit the text but not neccessarily the set size I want.
I thought I had done this before in an older version of RS but I can't seem to get it to work correctly in this version (2008).
Any ideas?
Try to set the Hidden property of the Static Row Group under the Details Group, in this case the whole row will disappear instead of the content of the textboxes.
If you are using Report Builder, you need to switch to Advanced Mode (make sure that the Properties and the Grouping windows are displayed, go to the upper right side of the Grouping window and press the black triangle):
Click on the second "Static" item under the "(Details)" group and you can set the Hidden property on the Properties window.
Link to MSDN sample
A simpler way to get to this option for hiding a row is to right-click on the row header and select "Row Visibility". From there you will get a dialog where to can enter an expression.
I was able to make the rows go away by setting the following 2 properties
textbox.CanShrink
row.Hidden
I played w/ row.HideIfNoRows and it seems to have no effect in accomplishing the desired outcome described by op.
Click on textbox, these one is in the properties of the textbox
(if there are multiple columns, I assume you will have to make this setting for each cell/textbox, in my case, I only had 1 column)
CanShrink=false
For the next property, you have to go into ADVANCED MODE by clicking the down arrow at the right side of the Row Groups/Column Groups pane.
Click on the Row containing the line you would like to hide.
The Hidden property can be found in properties pane...
This is an alternate way to set Hidden, as opposed to right clicking the Row Header in the actual Tablix.
Hidden= <expression describing when you want the row hidden hidden>
One other note - If you right click the Row Header and choose 'Row Visibility' you get a dialgue. the Row Property dialog has a caption "Show or Hide Based on an expression".
The actual behaviour is It will HIDE the row if the expression evaluates to TRUE.
IMHO - this is misleading, at best ambiguous.
Once you understand the property you are actually setting is called HIDDEN, then this makes sense. Until then, I certainly assumed I was setting a property called Visisble... FWIW....
On the empty row you want to hide, go to the text box properties and go to expressions -> visibility, then show or hide based on an expression and use
=iif(first(Fields!.Value = ""),true,false)
Setting row visibility logic is important, but I've learned that sometimes a blank row will still appear, even though its contents are hidden. To solve this, I had to do the following non-intuitive steps, but I did in fact succeed in completely suppressing unwanted white space.
In the cell in the tablix region, use the Insert > Rectangle menu option.
In the rectangle, use the Insert > Textbox menu option. Resize as needed.
In the textbox, right-click and enter a placeholder.
Set the value of the placeholder expression to whatever you need.