Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2005
    Posts
    7

    Unanswered: check box in Access Form

    Currently, I have a form with 3 check boxes and each one has different control source(different columns). I want to combine two check boxes in into 1. Is it possible to have 1 check box that links to 2 different control source ? Unfortunately, I can't change the existing tables by adding new column.

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    So essentially, if one checkbox is checked, you want the second one to be checked?

    Code:
    Private Sub CheckBox1_AfterUpdate()
     If Me.CheckBox1 = -1 Then
       Me.CheckBox2 = -1
     Else
       Me.CheckBox2 = 0
     End If
    End Sub
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I'd first be looking at the possibility of creating the new column in the form's underlying query.

    Just as a curiosity... why would you not be able to modify the tables if you are the developer of this database?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239

    Wink

    .... or

    Private Sub CheckBox1_AfterUpdate()
    Me.CheckBox2 = Me.CheckBox1
    End Sub

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I think I've misunderstood this. The confusing part is "I can't change the existing tables by adding new column".

    If you want one checkbox to control two fields simultaneously, adding a new column to the table won't help at all. If that is what you want to do, then vestigo has the right answer.... and then just make Checkbox2 invisible.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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