1933f Conditional Formatting
Sign Up |  Live StatsLive Stats    Articles 37,351| Comments 177,417| Members 19,424, Newest yashpal singh| Online 428
Home Contact
 (Forgotten?): 
    Sikhism
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Click Here to Register/Sign Up Daily Hukamnama Member Blogs Downloads Website Navigation Help Fonts Tags

Conditional Formatting

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 115 USD (23%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
Conditional Formatting more than 3 conditions??? Chester1 Information Technology 1 28-Jul-2006 08:33 AM
Conditional Formatting Question Bob Information Technology 3 28-Jul-2006 08:27 AM
Conditional Formatting Errors Kerry Purdy Information Technology 1 28-Jul-2006 08:25 AM
Conditional formatting on dates sam Information Technology 1 28-Jul-2006 08:11 AM
Conditional Formatting in Reports? Si Information Technology 1 10-Nov-2005 21:09 PM


Tags
conditional, formatting
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:41 AM
Appache's Avatar Appache
Guest
 
Posts: n/a
   
   
Conditional Formatting

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
I have two checkboxes in an continuous form and I want to change the color of
labels which are associated with these checkboxes. I read sth on internet and
figured out I cant use conditional formatting with checkbox so I try to find
out another solution and came up with this. I deleted labels and add two
texboxes and tried to use conditional formatting on that texboxes. I chosed
Expression Is and wrote [MycheckboxName]=True as my condition in order to
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/13893-conditional-formatting.html
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13893
change the color of textbox if checkbox is checked. Everything is ok but when
the backcolor of the texbox changes, it also changes the text with 0 or -1
which is weird for me. Is there any way to do it without changing text ? The
text in the textbox is static.

--
Thanks


Got anything to share on This Topic? Why not share your immediate thoughts/reaction with us! Login Now! or Sign Up Today! to share your views... Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:41 AM
Wayne-I-M's Avatar Wayne-I-M
Guest
 
Posts: n/a
   
   
RE: Conditional Formatting

Hi

This would change the lable [LableA1] if you checked the checkbox
[MycheckboxName] Font will be Red and Bold. Back colour would be Yellow.
You will need to change the colors to what you want.


Private Sub MycheckboxName_AfterUpdate()
On Error GoTo MycheckboxName_AfterUpdate_Err

If Me.MycheckboxName = 1 = True Then
Me.LabelA1.BackColor = vbYellow
Me.LabelA1.ForeColor = vbRed
Me.LableA1.FontBold = True

Else
Me.LabelA1.BackColor = vbBlack
Me.LabelA1.ForeColor = vbGreen
Me.LableA1.FontBold = False

End If

End Sub


--
Wayne
Manchester, England.



"Appache" wrote:

Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13893
> I have two checkboxes in an continuous form and I want to change the color of
> labels which are associated with these checkboxes. I read sth on internet and
> figured out I cant use conditional formatting with checkbox so I try to find
> out another solution and came up with this. I deleted labels and add two
> texboxes and tried to use conditional formatting on that texboxes. I chosed
> Expression Is and wrote [MycheckboxName]=True as my condition in order to
> change the color of textbox if checkbox is checked. Everything is ok but when
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13893
> the backcolor of the texbox changes, it also changes the text with 0 or -1
> which is weird for me. Is there any way to do it without changing text ? The
> text in the textbox is static.
>
> --
> Thanks

Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:41 AM
Appache's Avatar Appache
Guest
 
Posts: n/a
   
   
RE: Conditional Formatting

Thank you for your answer but I think it's not the solution because when I go
to next record and come back all the labels show up black again. I want to
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13893
save the color unless somebody unchecks the checkbox.
--
Thanks


"Wayne-I-M" wrote:

> Hi
>
> This would change the lable [LableA1] if you checked the checkbox
> [MycheckboxName] Font will be Red and Bold. Back colour would be Yellow.
> You will need to change the colors to what you want.
>
>
> Private Sub MycheckboxName_AfterUpdate()
> On Error GoTo MycheckboxName_AfterUpdate_Err
>
> If Me.MycheckboxName = 1 = True Then
> Me.LabelA1.BackColor = vbYellow
> Me.LabelA1.ForeColor = vbRed
> Me.LableA1.FontBold = True
>
> Else
> Me.LabelA1.BackColor = vbBlack
> Me.LabelA1.ForeColor = vbGreen
> Me.LableA1.FontBold = False
>
> End If
>
> End Sub
>
>
> --
> Wayne
> Manchester, England.
>
>
>
> "Appache" wrote:
>
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13893
> > I have two checkboxes in an continuous form and I want to change the color of
> > labels which are associated with these checkboxes. I read sth on internet and
> > figured out I cant use conditional formatting with checkbox so I try to find
> > out another solution and came up with this. I deleted labels and add two
> > texboxes and tried to use conditional formatting on that texboxes. I chosed
> > Expression Is and wrote [MycheckboxName]=True as my condition in order to
> > change the color of textbox if checkbox is checked. Everything is ok but when
> > the backcolor of the texbox changes, it also changes the text with 0 or -1
> > which is weird for me. Is there any way to do it without changing text ? The
> > text in the textbox is static.
> >
> > --
> > Thanks

Reply With Quote
  #4 (permalink)  
Old 28-Jul-2006, 08:41 AM
Wayne-I-M's Avatar Wayne-I-M
Guest
 
Posts: n/a
   
   
RE: Conditional Formatting

Hi

You can't. If your checkbox is bound to a field then it's doing what it's
meant to.

Say the question is "Wayne likes a cup of tea with his lunch"
If the answer = True
Then this answer will stay like this until you uncheck the box "for this
record only" and the lable formating (see my last post) will stay like this.
It may be the someone else has the answer "false" and so the lables will stay
in the format (color, bold/not bold, etc) that you have set for this responce
"from this record".

This only way to save the formating would be to have an unbound check box -
but what would be the point of that.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13893

Hope this helps.

--
Wayne
Manchester, England.



"Appache" wrote:

> Thank you for your answer but I think it's not the solution because when I go
> to next record and come back all the labels show up black again. I want to
> save the color unless somebody unchecks the checkbox.
> --
> Thanks
>
>
> "Wayne-I-M" wrote:
>
> > Hi
> >
> > This would change the lable [LableA1] if you checked the checkbox
> > [MycheckboxName] Font will be Red and Bold. Back colour would be Yellow.
> > You will need to change the colors to what you want.
> >
> >
> > Private Sub MycheckboxName_AfterUpdate()
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13893
> > On Error GoTo MycheckboxName_AfterUpdate_Err
> >
> > If Me.MycheckboxName = 1 = True Then
> > Me.LabelA1.BackColor = vbYellow
> > Me.LabelA1.ForeColor = vbRed
> > Me.LableA1.FontBold = True
> >
> > Else
> > Me.LabelA1.BackColor = vbBlack
> > Me.LabelA1.ForeColor = vbGreen
> > Me.LableA1.FontBold = False
> >
> > End If
> >
> > End Sub
> >
> >
> > --
> > Wayne
> > Manchester, England.
> >
> >
> >
> > "Appache" wrote:
> >
> > > I have two checkboxes in an continuous form and I want to change the color of
> > > labels which are associated with these checkboxes. I read sth on internet and
> > > figured out I cant use conditional formatting with checkbox so I try to find
> > > out another solution and came up with this. I deleted labels and add two
> > > texboxes and tried to use conditional formatting on that texboxes. I chosed
> > > Expression Is and wrote [MycheckboxName]=True as my condition in order to
> > > change the color of textbox if checkbox is checked. Everything is ok but when
> > > the backcolor of the texbox changes, it also changes the text with 0 or -1
> > > which is weird for me. Is there any way to do it without changing text ? The
> > > text in the textbox is static.
> > >
> > > --
> > > Thanks

Reply With Quote
  #5 (permalink)  
Old 28-Jul-2006, 08:41 AM
Wayne-I-M's Avatar Wayne-I-M
Guest
 
Posts: n/a
   
   
RE: Conditional Formatting

Ooops

Sorry forget all that (last post) I have just re-read your question.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13893

Yes you can.

Copy the formating (don't delet it from the AfterUpdate - simply copy it)
and paste it into the OnLoad action. This will mean that the formating is
loaded when you open the form and it will also be actioned when you make
changes to the CheckBox.


--
Wayne
Manchester, England.



"Appache" wrote:

> Thank you for your answer but I think it's not the solution because when I go
> to next record and come back all the labels show up black again. I want to
> save the color unless somebody unchecks the checkbox.
> --
> Thanks
>
>
> "Wayne-I-M" wrote:
>
> > Hi
> >
> > This would change the lable [LableA1] if you checked the checkbox
> > [MycheckboxName] Font will be Red and Bold. Back colour would be Yellow.
> > You will need to change the colors to what you want.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13893
> >
> >
> > Private Sub MycheckboxName_AfterUpdate()
> > On Error GoTo MycheckboxName_AfterUpdate_Err
> >
> > If Me.MycheckboxName = 1 = True Then
> > Me.LabelA1.BackColor = vbYellow
> > Me.LabelA1.ForeColor = vbRed
> > Me.LableA1.FontBold = True
> >
> > Else
> > Me.LabelA1.BackColor = vbBlack
> > Me.LabelA1.ForeColor = vbGreen
> > Me.LableA1.FontBold = False
> >
> > End If
> >
> > End Sub
> >
> >
> > --
> > Wayne
> > Manchester, England.
> >
> >
> >
> > "Appache" wrote:
> >
> > > I have two checkboxes in an continuous form and I want to change the color of
> > > labels which are associated with these checkboxes. I read sth on internet and
> > > figured out I cant use conditional formatting with checkbox so I try to find
> > > out another solution and came up with this. I deleted labels and add two
> > > texboxes and tried to use conditional formatting on that texboxes. I chosed
> > > Expression Is and wrote [MycheckboxName]=True as my condition in order to
> > > change the color of textbox if checkbox is checked. Everything is ok but when
> > > the backcolor of the texbox changes, it also changes the text with 0 or -1
> > > which is weird for me. Is there any way to do it without changing text ? The
> > > text in the textbox is static.
> > >
> > > --
> > > Thanks

Reply With Quote
  #6 (permalink)  
Old 28-Jul-2006, 08:41 AM
Appache's Avatar Appache
Guest
 
Posts: n/a
   
   
RE: Conditional Formatting

  Donate Today!  
Thank you very much..I tried it and it worked but I didnt add your code to
under Form's Load action.I paste that code under Form's current action. I
also didnt delete this code from afterupdate action.
--
Thanks


"Wayne-I-M" wrote:
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13893
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13893

> Ooops
>
> Sorry forget all that (last post) I have just re-read your question.
>
> Yes you can.
>
> Copy the formating (don't delet it from the AfterUpdate - simply copy it)
> and paste it into the OnLoad action. This will mean that the formating is
> loaded when you open the form and it will also be actioned when you make
> changes to the CheckBox.
>
>
> --
> Wayne
> Manchester, England.
>
>
>
> "Appache" wrote:
>
> > Thank you for your answer but I think it's not the solution because when I go
> > to next record and come back all the labels show up black again. I want to
> > save the color unless somebody unchecks the checkbox.
> > --
> > Thanks
> >
> >
> > "Wayne-I-M" wrote:
> >
> > > Hi
> > >
> > > This would change the lable [LableA1] if you checked the checkbox
> > > [MycheckboxName] Font will be Red and Bold. Back colour would be Yellow.
> > > You will need to change the colors to what you want.
> > >
> > >
> > > Private Sub MycheckboxName_AfterUpdate()
> > > On Error GoTo MycheckboxName_AfterUpdate_Err
> > >
> > > If Me.MycheckboxName = 1 = True Then
> > > Me.LabelA1.BackColor = vbYellow
> > > Me.LabelA1.ForeColor = vbRed
> > > Me.LableA1.FontBold = True
> > >
> > > Else
> > > Me.LabelA1.BackColor = vbBlack
> > > Me.LabelA1.ForeColor = vbGreen
> > > Me.LableA1.FontBold = False
> > >
> > > End If
> > >
> > > End Sub
> > >
> > >
> > > --
> > > Wayne
> > > Manchester, England.
> > >
> > >
> > >
> > > "Appache" wrote:
> > >
> > > > I have two checkboxes in an continuous form and I want to change the color of
> > > > labels which are associated with these checkboxes. I read sth on internet and
> > > > figured out I cant use conditional formatting with checkbox so I try to find
> > > > out another solution and came up with this. I deleted labels and add two
> > > > texboxes and tried to use conditional formatting on that texboxes. I chosed
> > > > Expression Is and wrote [MycheckboxName]=True as my condition in order to
> > > > change the color of textbox if checkbox is checked. Everything is ok but when
> > > > the backcolor of the texbox changes, it also changes the text with 0 or -1
> > > > which is weird for me. Is there any way to do it without changing text ? The
> > > > text in the textbox is static.
> > > >
> > > > --
> > > > Thanks

Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Active Discussions
Is Science a Religion?
Today 07:47 AM
18 Replies, 2,075 Views
UNITED SIKHS AID Team...
Today 03:19 AM
0 Replies, 31 Views
Woolwich Killing: The...
Today 03:05 AM
26 Replies, 291 Views
Abu Nusaybah, 'Friend'...
Today 02:33 AM
0 Replies, 44 Views
Stockholm riots throw...
Today 02:14 AM
10 Replies, 106 Views
How does Sikhi help you...
Today 02:04 AM
48 Replies, 1,225 Views
Sikh Spokesman (ਪੰਜਾਬੀ...
Today 01:52 AM
186 Replies, 4,659 Views
Rozana Reports (ਪੰਜਾਬੀ...
Today 01:41 AM
322 Replies, 7,737 Views
Paneer: what I have...
Yesterday 22:29 PM
8 Replies, 81 Views
How Many Sikhs Have...
Yesterday 21:55 PM
698 Replies, 51,741 Views
Transgenderism ... Right...
By Kaylee
Yesterday 17:55 PM
31 Replies, 1,385 Views
Rochester Gurdwara...
Yesterday 10:55 AM
2 Replies, 85 Views
US Congress panel passes...
Yesterday 04:22 AM
0 Replies, 50 Views
Harmeet Kaur Took the...
Yesterday 03:40 AM
0 Replies, 71 Views
Panjabi Alphabet Resource
24-May-2013 23:15 PM
12 Replies, 6,566 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 08:44 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.54677 seconds with 32 queries
0