Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Toggle between ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 30624 of 31576
Post > Topic >>

Toggle between two checkboxes on a form

by zufie <john.marruffo@[EMAIL PROTECTED] > Jul 1, 2008 at 11:37 AM

I have two checkboxes on a form, ChckIBCCP and ChckOtherReferral.

Each checkbox highlights its respective textboxes and combo boxes on
the form.

Many of the highlighted textboxes and combo boxes are the same for
either checkbox selected.

Some of the highlighted textboxes and combo boxes differ depending
upon which checkbox is selected.

I am unable to toggle between the two differing effects caused by
clicking each respective checkbox.

For example when I click on the second checkbox, ChckOtherReferral,
the highlighted textboxes and combo boxes associated with clicking on
this checkbox remain highlighted even after I click on the first
checkbox, ChckIBCCP!?

Can you help me?

Here is my code if it helps?

Private Sub ChckIBCCP_Click()
Dim ctl As Control

  For Each ctl In Me.Controls
    If ctl.Tag = "Shadow1" And ChckIBCCP = True _
    And ctl.ControlType = 109 Then
        ctl.BackColor = 16777215
    ElseIf ctl.Tag = "" And ctl.ControlType _
    = acTextBox Then
    ctl.BackColor = 65535
    End If
    If ctl.Tag = "Shadow1" And ChckIBCCP = True _
    And ctl.ControlType = 111 Then
        ctl.BackColor = 16777215
    ElseIf ctl.Tag = "" And ctl.ControlType _
    = acComboBox Then
        ctl.BackColor = 65535
    End If
    If ctl.Tag = "Shadow1" And ChckIBCCP = True _
    And ctl.ControlType = 106 Then
        ctl.SpecialEffect = 4
    ElseIf ctl.Tag = "" And ctl.ControlType _
    = acCheckBox Then
        ctl.SpecialEffect = 1
    End If
   Next
End Sub


Private Sub ChckOtherReferral_Click()
Dim ctl As Control

  For Each ctl In Me.Controls
    If ctl.Tag = "Shadow1" And ChckOtherReferral = True _
    And ctl.ControlType = 109 Then
        ctl.BackColor = 16777215
    ElseIf ctl.Tag = "" And ctl.ControlType _
    = acTextBox Then
    ctl.BackColor = 65535
    End If
    If ctl.Tag = "Shadow1" And ChckOtherReferral = True _
    And ctl.ControlType = 111 Then
        ctl.BackColor = 16777215
    ElseIf ctl.Tag = "" And ctl.ControlType _
    = acComboBox Then
        ctl.BackColor = 65535
    End If
    If ctl.Tag = "Shadow1" And ChckOtherReferral = True _
    And ctl.ControlType = 106 Then
        ctl.SpecialEffect = 4
    ElseIf ctl.Tag = "" And ctl.ControlType _
    = acCheckBox Then
        ctl.SpecialEffect = 1
    End If
   Next
End Sub


Thanks!,

John
 




 5 Posts in Topic:
Toggle between two checkboxes on a form
zufie <john.marruffo@[  2008-07-01 11:37:47 
Re: Toggle between two checkboxes on a form
"Linq Adams via Acce  2008-07-02 00:44:49 
Re: Toggle between two checkboxes on a form
"Carlos Nunes-Ueno&q  2008-07-02 01:40:21 
Re: Toggle between two checkboxes on a form
zufie <john.marruffo@[  2008-07-08 07:16:22 
Re: Toggle between two checkboxes on a form
zufie <john.marruffo@[  2008-07-08 07:29:10 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 23:06:50 CST 2008.