Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    2

    Unanswered: Problem Changing colors with a check box

    What I am trying to do is have a check box on each of my records so that when I have completed a job (record) and check the check box as done, the main textbox in my record will be blacked out (changed to another color). Could someone please help me in the design of this feature to my database.

    Thanks

  2. #2
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Smile Re: Problem Changing colors with a check box

    Originally posted by gmcclell
    What I am trying to do is have a check box on each of my records so that when I have completed a job (record) and check the check box as done, the main textbox in my record will be blacked out (changed to another color). Could someone please help me in the design of this feature to my database.

    Thanks
    This check box is a field in your table right? If it is just a control on the form and is not tied to a record it will remain in whatever state you put it in for all the records.

    In the OnCurrent event of the form you can check for the value of the check box and when you change the state of the check box you can also run the same code.

    If ck1 Then (the same as ck1.value = true)

    txt1.Backcolor = vbBlack

    Else

    txt1.Backcolor = vbRed

    End If

    You can substitute the BackColor or ForeColor values found in the property sheet for the values above.

    Gregg

  3. #3
    Join Date
    Oct 2003
    Posts
    2

    Re: Problem Changing colors with a check box

    Originally posted by basicmek
    This check box is a field in your table right? If it is just a control on the form and is not tied to a record it will remain in whatever state you put it in for all the records.

    In the OnCurrent event of the form you can check for the value of the check box and when you change the state of the check box you can also run the same code.

    If ck1 Then (the same as ck1.value = true)

    txt1.Backcolor = vbBlack

    Else

    txt1.Backcolor = vbRed

    End If

    You can substitute the BackColor or ForeColor values found in the property sheet for the values above.

    Gregg



    THANK YOU FOR YOUR HELP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •