UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Conditional Formatting on Continuous Form With Six Conditions    
 
   
mnussbaum
post Nov 26 2007, 09:30 AM
Post #1

UtterAccess Addict
Posts: 123



I have a continuous form. One text box is called "Status" and has six possible choices. I'd like to color the background of the Status text box based on the status. For example, if status is "On Hold" the background of the Status text box should be red. How do I get beyond the limit of 3 conditions?
Go to the top of the page
 
+
TheOtherDodge
post Nov 26 2007, 09:54 AM
Post #2

UtterAccess Ruler
Posts: 1,658



You can go into VBA and set the back ground color there, based on the selection.

ex:

Private Sub status_AfterUpdate()

if me.status = "On Hold" then
me.txtStatus.backcolor = vbRed
.....etc...
Go to the top of the page
 
+
niesz
post Nov 26 2007, 09:58 AM
Post #3

Utter A-fishin'-ado
Posts: 17,723
From: Cincinnati, Ohio, USA . . . ><((((°>



The simple answer is "You can't." Conditional formatting is limited to 4 ... The default and the 3 conditions.

You will need to use something like this.
Go to the top of the page
 
+
mnussbaum
post Nov 26 2007, 10:50 AM
Post #4

UtterAccess Addict
Posts: 123



So I saw the referenced thread, interesting technique. However, I'm having trouble with the z-order. When I place the colored text boxes on the Status text box, it covers it up. If I place Status on the colored boxes the color is there but again the Status is hidden. How do I put the Status box on top?
Go to the top of the page
 
+
mnussbaum
post Nov 26 2007, 10:59 AM
Post #5

UtterAccess Addict
Posts: 123



Related question: can I set the Back Color property for the Status text box using a function? In other words, instead of a number in the Back Color box (e.g., -2147483643), have it point to a function that calculates the color based on the value of the text box?
Go to the top of the page
 
+
niesz
post Nov 26 2007, 11:02 AM
Post #6

Utter A-fishin'-ado
Posts: 17,723
From: Cincinnati, Ohio, USA . . . ><((((°>



You cannot control this via code because of it being a continuous form. When you change the backcolor, it will change it for all the records.

It would be best if you just posted a stripped copy of the DB with a detailed explanation of the coloring you need and I'll take a look.
Go to the top of the page
 
+
mnussbaum
post Nov 26 2007, 11:14 AM
Post #7

UtterAccess Addict
Posts: 123



Attached is a much simplified version. Basically, for each status I'd like a unique color to be displayed on the form. Thanks in advance!
Attached File(s)
Attached File  Status.zip ( 12.55K ) Number of downloads: 30
 
Go to the top of the page
 
+
niesz
post Nov 26 2007, 11:17 AM
Post #8

Utter A-fishin'-ado
Posts: 17,723
From: Cincinnati, Ohio, USA . . . ><((((°>



Do you mind reposting it in ACC2000 format? Either that or I"ll have to wait till I get home to open it with 2003. Thanks!
Go to the top of the page
 
+
mnussbaum
post Nov 26 2007, 11:19 AM
Post #9

UtterAccess Addict
Posts: 123



Attached...
Attached File(s)
Attached File  Status2000.zip ( 11.9K ) Number of downloads: 16
 
Go to the top of the page
 
+
niesz
post Nov 26 2007, 11:27 AM
Post #10

Utter A-fishin'-ado
Posts: 17,723
From: Cincinnati, Ohio, USA . . . ><((((°>



See attached...
Attached File(s)
Attached File  Status2000.zip ( 12.98K ) Number of downloads: 96
 
Go to the top of the page
 
+
mnussbaum
post Nov 26 2007, 11:40 AM
Post #11

UtterAccess Addict
Posts: 123



What do the Û's represent in the text box? And did you do anything special to get the Status to remain on top?

=IIf([Status]=4,"ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ","")
Go to the top of the page
 
+
niesz
post Nov 26 2007, 11:42 AM
Post #12

Utter A-fishin'-ado
Posts: 17,723
From: Cincinnati, Ohio, USA . . . ><((((°>



Those are Full Block characters in the Terminal font.

To get Status on top of them all I selected the Status field, placed it on top of all the other boxes, and chose "Format> Bring to Front" off of the menus.
Go to the top of the page
 
+
mnussbaum
post Nov 26 2007, 01:49 PM
Post #13

UtterAccess Addict
Posts: 123



QUOTE
To get Status on top of them all I selected the Status field, placed it on top of all the other boxes, and chose "Format> Bring to Front" off of the menus.

(IMG:http://www.utteraccess.com/forum/style_emoticons/default/thumbup.gif) Works like a champ! For some reason I was looking in the properties box and right-click menus for that. Thanks for all your help!
Go to the top of the page
 
+
Bradley110
post Mar 26 2008, 12:19 PM
Post #14

UtterAccess Member
Posts: 21



I have been using this code for a while now. Not to bring this out of the grave, but is there any way that you could subsitute the Û for something else. What I really wish to accomplish is to allow a printer friendly version of the code. When I look in the print preview it looks beautiful, but as I print you can still see all of the Û's.

Thanks in advance.
Go to the top of the page
 
+
niesz
post Mar 26 2008, 12:23 PM
Post #15

Utter A-fishin'-ado
Posts: 17,723
From: Cincinnati, Ohio, USA . . . ><((((°>



Printer drivers can wreak havoc on higher Character Set values.

The only thing I could recommend is trying a different font and finding another Full Block character. You would then just change the font formatting of the control to match.

You can use the system Character Map to explore new fonts.

Start> All Programs> Accessories> System Tools> Character Map

...and hope your printer driver does not thrash the new one.
Go to the top of the page
 
+
Bradley110
post Mar 26 2008, 12:42 PM
Post #16

UtterAccess Member
Posts: 21



Awesome. Worked like a charm. I just found a full block character that actually looks like a block.

Thanks for the very prompt reply.

-Brad
Go to the top of the page
 
+
niesz
post Mar 26 2008, 01:23 PM
Post #17

Utter A-fishin'-ado
Posts: 17,723
From: Cincinnati, Ohio, USA . . . ><((((°>



NP. (IMG:http://www.utteraccess.com/forum/style_emoticons/default/thumbup.gif)

You may consider sharing the font you used so that others who are having the same issue can benefit. (IMG:http://www.utteraccess.com/forum/style_emoticons/default/wink.gif)
Go to the top of the page
 
+
playtowin
post Sep 11 2008, 11:58 AM
Post #18

UtterAccess Addict
Posts: 183
From: Georgia



I had the same issue as Bradley110, when it came to printing reports that use this technique. I went to the Character Map (Start> All Programs> Accessories> System Tools> Character Map), checked the Advanced View box, and then searched for Full Block.

On my machine, the only resulting character is called U+2588 Full Block and it looks like a solid, upright, black rectangle.

I copied this from the Character Map and pasted it in place of the Û and the print output looks like the screen output. WYSIWYG.

Thanks Walter, for such a slick workaround to the conditional formatting limitation!

Mark
Go to the top of the page
 
+
tkepongo
post Sep 20 2011, 12:51 PM
Post #19

New Member
Posts: 1



I know this is a pretty old thread, but I was wondering if anyone knew how to change the conditions. For example, the attached files have conditions such as

CODE
=IIf([Status]=4,"ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ","")


How do I change it so that it searches for a string such as

CODE
InStr([Status],"Complete")<>0


Thanks!
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 25th May 2013 - 02:29 AM