My Assistant
![]()
Custom Search
|
![]() ![]() |
![]() |
![]() Post#1 | |
![]() Posts: 158 Joined: 19-October 04 ![]() | Is it possible to conditional format the background of Multiple Controls based the Value of TWO other controls on the same form? I have needed to add a'gname' field to the table in the sample. I need to highlight the matched number as before, but with a different colour for each person.. what expression can I use? It is currently this.. I've tried so many expression variations.. Thanks in advance. ps. I have duped this post on an older thread as a reply but thought it better to post as a new questiony. Mod may wish to delete. regards Freesp This post has been edited by freespiritcherishes: Oct 18 2019, 07:37 PM Attached File(s) ![]() ![]() ![]() ![]() |
![]() Post#2 | |
Posts: 1,009 Joined: 25-January 16 ![]() | Yes, can have multiple criteria in a condition rule. However, what you want is multiple rules. If your list of people will never be more than 50 then you can have a rule for each name. If names in database change, would have to modify rule. VBA code can set CF rules. Would need a field in table with color code. However, there could be hundreds of people which means would have to be done with VBA directly setting textbox BackColor property in which case color coding could only take place with report direct to printer or PrintPreview, not ReportView. I personally don't see the benefit. This post has been edited by June7: Oct 18 2019, 09:56 PM -------------------- Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression. DEBUG! DEBUG! DEBUG! http://www.cpearson.com/Excel/DebuggingVBA.aspx |
![]() Post#3 | |
![]() Posts: 158 Joined: 19-October 04 ![]() | Hi June Thank you for replying. My list of people is 10 and they appear randomly every day. How do I write an expression with two rules? ie.. Erm.. this control = [pip] And [gname] = kathy ... background red-red. this control = pip and gname = florence ..turn background blue... something like that. This post has been edited by freespiritcherishes: Oct 19 2019, 04:27 AM |
![]() Post#4 | |
![]() UtterAccess VIP Posts: 10,145 Joined: 25-October 10 From: Gulf South USA ![]() | Hi: See my response in your other thread HERE. Not easy, but looks do-able. Note: Better not to post the same issue in two places... HTH Joe -------------------- "Each problem that I solved became a rule, which served afterwards to solve other problems." "You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing." Rene Descartes 1596-1650 (Mathematician and Philosopher) |
![]() Post#5 | |
Posts: 1,009 Joined: 25-January 16 ![]() | Looks like RJD has given you example that follows my suggestion. As that example shows, expression does not have two rules - each control has multiple rules and each rule has an expression with multiple criteria. If names are random each day, where do they come from? Your example data is a static list of names. I still don't see benefit. Usually, applying different colors assigns different meaning to the highlight, e.g. Low, Medium, High or Vacation, Training, JuryDuty. This post has been edited by June7: Oct 19 2019, 02:47 PM -------------------- Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression. DEBUG! DEBUG! DEBUG! http://www.cpearson.com/Excel/DebuggingVBA.aspx |
![]() Post#6 | |
![]() Posts: 158 Joined: 19-October 04 ![]() | Hi June, Hi Joe, yes, in fact, I had a v similar notion before I posted the question, I was to see if there might be a code solution to the cumbersome repetitious problem of editing each object. Joe, the sample was great and a keeper, thank you! To be honest, those 70 objects each have 10 different rules, but only needs doing twice..Group A (70s) and Group B (70s) of my project which will make no sense to anyone. Ive done one lot manually, will take my time doing second lot. I might show you all one day if your lucky! ![]() ![]() |
![]() Post#7 | |
![]() UtterAccess VIP Posts: 10,145 Joined: 25-October 10 From: Gulf South USA ![]() | You are very welcome. You might show us the final db when you get it in case others following this are interested. Continued success with your project. Regards, Joe -------------------- "Each problem that I solved became a rule, which served afterwards to solve other problems." "You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing." Rene Descartes 1596-1650 (Mathematician and Philosopher) |
![]() Post#8 | |
![]() Posts: 158 Joined: 19-October 04 ![]() | ha ha .. Thank you Joe.. omg,, I'd be embarrassed.. I would more likely bribe you or another UA member to 'make it look normal' before I'd do that ha ha.. but will do :-) |
![]()
Custom Search
|
![]() | Search Top Lo-Fi | 9th December 2019 - 12:47 AM |