+ Reply to Thread
Results 1 to 4 of 4

Active X Checkboxes

  1. #1
    Holanmeg
    Guest

    Active X Checkboxes

    Is there any way of making check boxes work in the same way as radio buttons,
    i.e. making it possible to be able to only have one box ticked in a group.
    You may say use radio buttons, but the users of the form I am constructing
    would prefer to have tick boxes.
    Many thanks for any assistance.

  2. #2
    Harald Staff
    Guest

    Re: Active X Checkboxes

    Hi

    You can change checkbox values by code. Try this:

    Private Sub CheckBox1_Click()
    Me.CheckBox2.Value = Not (Me.CheckBox1.Value)
    End Sub

    Private Sub CheckBox2_Click()
    Me.CheckBox1.Value = Not (Me.CheckBox2.Value)
    End Sub

    HTH. Best wishes Harald

    "Holanmeg" <Holanmeg@discussions.microsoft.com> skrev i melding
    news:C99630EA-9432-4EFF-B828-8ADB3B4FCBFA@microsoft.com...
    > Is there any way of making check boxes work in the same way as radio

    buttons,
    > i.e. making it possible to be able to only have one box ticked in a group.
    > You may say use radio buttons, but the users of the form I am constructing
    > would prefer to have tick boxes.
    > Many thanks for any assistance.




  3. #3
    Holanmeg
    Guest

    Re: Active X Checkboxes

    Thanks. This works for two checkboxes, but I cannot make it work for more
    than two. I tried including more lines of the same code but with different
    box references, under each Sub routine for three boxes.


    "Harald Staff" wrote:

    > Hi
    >
    > You can change checkbox values by code. Try this:
    >
    > Private Sub CheckBox1_Click()
    > Me.CheckBox2.Value = Not (Me.CheckBox1.Value)
    > End Sub
    >
    > Private Sub CheckBox2_Click()
    > Me.CheckBox1.Value = Not (Me.CheckBox2.Value)
    > End Sub
    >
    > HTH. Best wishes Harald
    >
    > "Holanmeg" <Holanmeg@discussions.microsoft.com> skrev i melding
    > news:C99630EA-9432-4EFF-B828-8ADB3B4FCBFA@microsoft.com...
    > > Is there any way of making check boxes work in the same way as radio

    > buttons,
    > > i.e. making it possible to be able to only have one box ticked in a group.
    > > You may say use radio buttons, but the users of the form I am constructing
    > > would prefer to have tick boxes.
    > > Many thanks for any assistance.

    >
    >
    >


  4. #4
    Harald Staff
    Guest

    Re: Active X Checkboxes

    First allow me to say that this is a really silly idea. The customer wants
    something to bark and scare off thieves, but dogs are ugly and smelly, so
    the customer wants it to be a pussycat. So how do we teach a pussycat to
    bark, and how do we make thieves afraid of them ? We require it. Customers
    are not always right. But see if this works for you, the technique is useful
    anyway:

    Private Sub CheckBox1_Click()
    If CheckBox1.Value = True Then
    CheckBox2.Value = False
    CheckBox3.Value = False
    End If
    End Sub

    Private Sub CheckBox2_Click()
    If CheckBox2.Value = True Then
    CheckBox1.Value = False
    CheckBox3.Value = False
    End If
    End Sub

    And so on.

    HTH. Best wishes Harald

    "Holanmeg" <Holanmeg@discussions.microsoft.com> skrev i melding
    news:1C399953-C6EE-425E-A55A-9DA2B9A9F2B2@microsoft.com...
    > Thanks. This works for two checkboxes, but I cannot make it work for more
    > than two. I tried including more lines of the same code but with

    different
    > box references, under each Sub routine for three boxes.
    >
    >
    > "Harald Staff" wrote:
    >
    > > Hi
    > >
    > > You can change checkbox values by code. Try this:
    > >
    > > Private Sub CheckBox1_Click()
    > > Me.CheckBox2.Value = Not (Me.CheckBox1.Value)
    > > End Sub
    > >
    > > Private Sub CheckBox2_Click()
    > > Me.CheckBox1.Value = Not (Me.CheckBox2.Value)
    > > End Sub
    > >
    > > HTH. Best wishes Harald
    > >
    > > "Holanmeg" <Holanmeg@discussions.microsoft.com> skrev i melding
    > > news:C99630EA-9432-4EFF-B828-8ADB3B4FCBFA@microsoft.com...
    > > > Is there any way of making check boxes work in the same way as radio

    > > buttons,
    > > > i.e. making it possible to be able to only have one box ticked in a

    group.
    > > > You may say use radio buttons, but the users of the form I am

    constructing
    > > > would prefer to have tick boxes.
    > > > Many thanks for any assistance.

    > >
    > >
    > >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1