Conditional Formatting Based On DCount

Apr 11, 2006

Hi all.

I've been struggling to find a solution for this. Never previously used conditional formatting I could use some help.

I have a sub form consisting of continuous forms...

Based on whether or not the below DCount indicates 1 or 0 I want to change the BackColor of a Textbox.

DCount("fID", "tblRegister", "fID = " & Me.fID.Value & " AND samtyckeBarn = TRUE AND samtyckeBarnVuxen = TRUE"))

Where/how do I implement this?
I do not yet fully understand the FormatConditions collection of the textbox but I guess that's where to work.

View Replies


ADVERTISEMENT

Conditional Formatting Based On Another Field

Mar 28, 2006

Is there a way to apply conditional formatting on a field based on the contents of another field?

For example, lets say I have the following fields

START_DATE
APPROVED_DATE
CAT#
DAYS_OPEN

The DAYS_OPEN field is automatically calculated in the query and is not a stored date.

My criteria is that if CAT# is 3, my days open should not exceed 30 but if my CAT# is 1 or 2, my days open should not exceed 60. I want to apply conditional formatting so that it turns yellow at approximately 80% of the date limit and red at approximately 90% of the date limit, otherwise the conditional formatting is green.

I know how to do conditional formatting, but no sure if it can be modified based on the content of another field.

Thanks for any suggestions.

Jim

View 4 Replies View Related

Conditional Formatting - Form Based On Text Box Entry

Mar 24, 2006

Hello,
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 what’s output 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 forms background changes to the required colour when its value is ‘set exactly’ but what I am trying to achieve is to change it according to the first letter of entry regardless of what follows? 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

Can anyone help me out of a ' sticky situation'..

Ta Very much

Carol

View 3 Replies View Related

Forms :: Conditional Formatting Based On Value In Targets Table

Oct 15, 2014

I have a form which basically has - employee, work done, hours and a calculated field (w/hour) of work done/hours

I can manually set the conditional formatting however as time changes targets will go up and it would be easier to update the targets in another 'admin form' (i can manage that part)

Its just referencing the other table to say the likes of :

if work per hour is greater than tbltargets.convtargetmid then vborange, if work per hour is greater than tbltargets.convtargethigh then vbgreen else vbred.

View 3 Replies View Related

Forms :: Conditional Formatting Based Upon Presence Of A Record

Mar 13, 2014

I have a subform (called NAMES) on a main form (called MAIN) that lists names. Elsewhere on MAIN, I have a second subform (called ASSIGNED) that lists people that have been assigned.

When I double click a name on NAMES, it automatically adds them to the ASSIGNED list (who's record source is a table). What I want the NAMES form to do is conditionally format the NAMES form so that the record that's been added turns green. That way I can see who I've added and who I haven't yet added. Once I've added them all, the NAMES form is a simple list of all-green names. If there's a black name in the list, it's because I haven't yet added them to ASSIGNED.

I've tried a DLookup function, and I've tried a Value= conditional formatting rule, and neither one are working... I already got the 'double click to add' thing working, now I just need the name to turn green when I've added them.

View 11 Replies View Related

Reports :: Conditional Formatting Based On Two Fields - Highlight In Red?

Feb 17, 2015

So i have two fields I need to tie together for conditional formatting

If the "status" field says "RETURN" and its over "30" days then I need to highlight it RED

If the "status" field says "AVAILABLE" and its over "90" days then I need to highlight it RED

Is this possible?

View 5 Replies View Related

Forms :: Conditional Formatting Text Boxes Based On Yes / No Field

Jan 8, 2015

I am trying to get the text in a couple text boxes to turn green if a certain Yes/No field is left blank.

I know the conditional formatting is working, because condition 1 and 3 are working fine (those expressions are referencing text fields).

I would like to have Condition 2 look at [DM_Approval] from the bound query and if it is unchecked, execute the conditional formatting.

I've tried all kinds of statements, but i'm starting to think that the expressions in the conditional formatting window just won't work when referencing a yes/no field.

Specifically (at the very least) i know i tried [DM_Approval]=False, [DM_Approval]=No, [DM_Approval]=0, and [DM_Approval] is null.

View 3 Replies View Related

Reports :: Conditional Formatting On Multiple Fields Based On Two Criteria

Sep 24, 2014

I have a report which I would like to apply conditional formatting on multiple fields. I would like the conditional formatting to be based on two types of criteria

First criteria would be contracts that start with the year 2014. I used the following expression which worked - InStr(1,[ContractNr],"2014" AND [DirectorInCharge]= "Joseph Steinbok" or "Adam Godson")

To this expression I would also like to highlight fields which contracts start with 2014 AND have a particular Director assigned to it. For this I used the following expression - And [DirectorInCharge]="Name"

On their own, both expressions are working but I want to combine them. How do I do this? I've tried the following - InStr(1,[ContractNr],"2014" AND [DirectorInCharge]= "Name") but then nothing is highlighted. I also tried InStr(1,[ContractNr],"2014") AND [DirectorInCharge]= "Name" - in this instance EVERY record was highlighted.

View 4 Replies View Related

Reports :: Conditional Formatting - Rows To Be Of Specific Color Based On Value In 1 Field

Jul 24, 2014

I have a report that I would like to have the rows be a specific color based on the value in 1 field on the row.

I have attempted to use conditional formatting but it will not work (IE, I can get font color to change, but not field boxes to have color).

The field is labeled [text144] based on the value in the field (1,2, or 3) I would like the field to be a different color.
i.e.
3 = green
2 = yellow
1 = red

View 4 Replies View Related

Forms :: Conditional Formatting Changing Field Color Based On Hours Passed

Jan 7, 2015

I'm having a spot of trouble trying to get conditional formatting to work. I have an overview form which displays current quotes going through the system, the QuoteStartTime field is generated from the Now() command.I Would like if possible to show, 1 hour = Green, 2 hours = Amber and 3+ hours Red.

I've tried variations of
hour([QuoteStart])>1
DateAdd("h",1,[QuoteStartTime])

I've done this before with a date only field before, but working with time is taking too much time.

View 1 Replies View Related

Forms :: Default Formatting Option In Conditional Formatting Dialog?

Aug 1, 2014

Need to confirm whether the Default formatting option in the Conditional formatting Dialog won't work in datasheet view of a form. Please note that all conditional criteria are working fine but not the Default Formatting option - only in the Datasheet view (In Single Form view the default formatting is working fine)

View 11 Replies View Related

Conditional Formatting

Apr 18, 2006

Hi Guys,

I've a question and I hope you can help me out.......
I'm trying to use Conditional Formatting Options on a Text box called "Date". I'd like that this box become Red if its value is between value1 from Text box "Start Date" and value2 from Text box "End Date" or Green otherwise (in this way the color change dynamically every time I change the values of Text Boxes "Start Date " and "End Date"). How can I do that? What I need to type in the Conditional Formatting Windows?

Thanks a lot for you help!!!!

Ciao Ciao

View 1 Replies View Related

Conditional Formatting

Aug 13, 2007

Hello

On my Database I have used Conditional Formattion to change the colour of the qty to highlight when the qty is getting low however its not as good as I would hope as there are different type of definition of quantity (D of Q) e.g. Each (single items such as a screw) and Roll (such as cord and tape)

Conditional formatting doesnt work well because if I have it as less than 10 the qty is in red, its ok for the each items however not the roll as 10 rolls of tape is more than we would need.

I am just wondering if anyone knows what the code would be to change the colour depending on the qty and the D of Q

All i have got so far is:
If me.qty <10 and DofQ = EA then

Now im stuck for the change colour part

Any help would be great

View 13 Replies View Related

Conditional Formatting Help

Sep 2, 2007

Hi Guys,

I'm after an easy way on being able to change the colour of a field once it a certain figure is reached

For instance

Standard field colour for anything 1-99
100+ changes to red

Would any be able to help me out please?

View 2 Replies View Related

Conditional Formatting

Sep 8, 2005

Does anyone know if there is a way in a report to display an entire row in a different color? I'm running a report based on a query and I need specific information to come up in RED. I read about conditional formatting but you can only apply it to a field in a report, but not to an entire row. Let's say I have a group of managers and I need to know the ones that are making more than $50,000 a year. I don't just want the salary to come in RED, I need the entire row (like name, last name, title, date of hire, salary, etc).
Any ideas?

thanks!

View 2 Replies View Related

Conditional Formatting

Mar 13, 2005

I have 2 subforms on a main form. I would like to compare the value in field 1 og subform 1 to field 1 of subform 2. I can't seem to get the conditional foramtting between the 2 subforms to work. Any ideas?

Jim

View 1 Replies View Related

Conditional Formatting?

Mar 22, 2005

Good afternoon everyone
I am new to this forum. I have not done access development for about 6 years so I appologise for my rustiness.
I have created a form based on a query. The form is of type Datasheet. I have assigned Conditional formatting to the grid fields based on an expression evaluating a check box. This works fine and when I open the form the conditional formatting works great.

However, I am now trying to add this form as a subform in A.N Other form. The parent form has no datasource and is purely there to display some text values linked to unbound controls. I did this because apparently you cannot show form header for a datasheet view.
When I insert my child form into the parent there is no logical link. The behaviour of the form and subform works fine but the conditional formatting does not appear in the subform grid.
Why is this and how can I best sort this?
Any help would be appreciated, but please be aware I am not fluent in VB as I have been away for quite some time.

Bets regards
Philm

View 1 Replies View Related

Conditional Formatting

Mar 8, 2006

Hello!
I am stuck with a problem in my database.
I got a table that is looking like this:
On_Time
95%
96,88%
100%
100%
97,56%

There is more data there but this is the field i want to use. I got a form where i want a little box or something to be coloured in red if the average of all those percentages are below 95%. If its above 95% it should be green.
Can anyone help?

View 1 Replies View Related

Conditional Formatting

May 15, 2006

Hi. I have a problem with my conditional formatting. I have two fields field 1 (hours worked) and field 2 (hours per task). Field 1 shows the hours worked based on the difference between a start and finish time and field 2 shows the hours per tasked based on values assigned to the 10 task fields. I set the formatting of field 1 to show up in red if it did not match the value of field 2, which works fine most of the time. However, for certain values i.e. 5 or 6 field 1 still shows up in red even though field 2 has the same value i.e. both equal 6.

Could someone explain to me why this happens and offer a solution if possible.

Thanks for any help.

View 7 Replies View Related

Conditional Formatting

Oct 12, 2004

I have an Access form that is used for traffic counts. I have a total of 8 lanes of data entry rows (4 lanes each way).I have two text boxes that show the number of lanes in each direction for a specific location. I need the input forms to enable ONLY the number of rows displayed on the text box and disable the rest. I dont have a clue on how to do it. Tried conditional formatting. But the conditions overlap.

View 2 Replies View Related

Conditional Formatting

Oct 26, 2004

Hi,
I would like to format a report containg a PASS/FAIL field (electrical test results) so that the "Fail's" are printed in bold text, however when I use conditonal formatting #Name? is diplayed on the report instead of either Pass or Fail.
Any suggestions?

View 10 Replies View Related

Conditional Formatting

Feb 28, 2006

hi all

im trying to colour a cell that is null in datasheet view in a form. i can coulour values that are zero but i can't seem to find a way to colour null values.

any ideas??

View 2 Replies View Related

Conditional Formatting

Dec 6, 2006

How can I use conditional formatting to have a field change background colors if it is populated or stays white if left blank. Do I use field value, field has focus or expression.

View 1 Replies View Related

Conditional Formatting

Mar 10, 2007

Hi,
I upgraded from Access 2000 to 2003 - I don't appear to have the conditional formatting option on the format tab in document view and no fomat tab along the top in design view - any thoughts any one?

Regds

Brian

View 2 Replies View Related

Conditional Formatting

Jul 27, 2007

I have two fields in my report: jc_lvd & jc_lvsd. Both fields have the possibility of either a "Yes" or "No" answer in their fields. I've combined these two fields into one field like this: =[jc_lvf] & " / " & [jc_lvsd]. When each field has a "No" answer, I need to highlight the background. I'm not interested in any other combination, i.e. Yes/No, No/Yes, Yes/Yes, ONLY if the fields are No/No. I have done conditional formatting with just one field but having both these fields combined is throwing me off. Would it be better to have separate fields for each and if so.........how would I have the conditional formatting look at two fields at the same time and then highlight both fields if they met my No/No criteria? Thanks for any help.

View 11 Replies View Related

Conditional Formatting

Aug 6, 2007

I have a field that most likely will not have an entry in it, BUT, ocassionally it will. When the field does have an entry in it, the entry can be any number amount. I've worked with conditional formatting before where I have the field color a background if the field meets a certain criteria, no problem. What I need to do is have the background of the cell highlight if their is ANY entry in it at all and not highlight, of course, if the cell is empty. Thanks for any help.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved